Commit d0688b90 authored by David Morley's avatar David Morley

remove tests, been there years and never used or setup

parent 50d50e2f
language: php
php:
- 7.0
before_script: "./phpunit/before.sh"
script: export DISPLAY=:99.0 && phpunit
<phpunit>
<testsuites>
<testsuite name="poduptime">
<file>phpunit/main.php</file>
<file>phpunit/RemoteConnectTest.php</file>
</testsuite>
</testsuites>
</phpunit>
\ No newline at end of file
<?php
class RemoteConnect
{
public function connectToServer($serverName=null)
{
if($serverName==null){
throw new Exception("That's not a server name!");
}
$fp = fsockopen($serverName,80);
return ($fp) ? true : false;
}
public function returnSampleObject()
{
return $this;
}
}
?>
<?php
require_once('RemoteConnect.php');
class RemoteConnectTest extends PHPUnit_Framework_TestCase
{
public function setUp(){ }
public function tearDown(){ }
public function testConnectionIsValid()
{
// test to ensure that the object from an fsockopen is valid
$connObj = new RemoteConnect();
$serverName = 'podupti.me';
$this->assertTrue($connObj->connectToServer($serverName) !== false);
}
}
?>
sh -e /etc/init.d/xvfb start
#export DISPLAY=:99.0 && firefox -CreateProfile test
#wget http://selenium.googlecode.com/files/selenium-server-standalone-2.15.0.jar
#export DISPLAY=:99.0 && sudo java -jar selenium-server-standalone-2.15.0.jar -firefoxProfileTemplate "./phpunit/knmqtcr7.test" &
#pyrus install phpunit/PHPUnit_Selenium
composer install
phpenv rehash
<?php
class CodeCoverageTest extends PHPUnit_Extensions_Selenium2TestCase
{
protected $coverageScriptUrl = 'http://localhost/phpunit_coverage.php';
public function setUp()
{
$this->markTestIncomplete('Would require PHP 5.4 for running .php files on the server');
$this->setBrowser(PHPUNIT_TESTSUITE_EXTENSION_SELENIUM2_BROWSER);
$this->setBrowserUrl('http://localhost/');
}
public function testCoverageIsRetrieved()
{
$this->url('example.php');
}
}
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment