Exemplo n.º 1
0
 function AllTests()
 {
     $this->TestSuite('FlatDB tests - Simple test' . SimpleTest::getVersion());
     $this->addFile(dirname(__FILE__) . '/test_rows.php');
     $this->addFile(dirname(__FILE__) . '/test_columns.php');
     $this->addFile(dirname(__FILE__) . '/test_read_add.php');
 }
Exemplo n.º 2
0
 function AllTests()
 {
     $this->GroupTest('All tests for SimpleTest ' . SimpleTest::getVersion());
     $this->addTestCase(new UnitTests());
     $this->addTestFile(dirname(__FILE__) . '/shell_test.php');
     $this->addTestFile(dirname(__FILE__) . '/live_test.php');
     $this->addTestFile(dirname(__FILE__) . '/acceptance_test.php');
 }
Exemplo n.º 3
0
 public function AllTests()
 {
     $this->TestSuite('All tests for SimpleTest ' . SimpleTest::getVersion());
     $this->addFile(dirname(__FILE__) . '/unit_tests.php');
     $this->addFile(dirname(__FILE__) . '/shell_test.php');
     $this->addFile(dirname(__FILE__) . '/live_test.php');
     $this->addFile(dirname(__FILE__) . '/acceptance_test.php');
 }
Exemplo n.º 4
0
 function __construct()
 {
     parent::__construct('All tests for SimpleTest ' . SimpleTest::getVersion());
     $this->addFile(dirname(__FILE__) . '/unit_tests.php');
     $this->addFile(dirname(__FILE__) . '/shell_test.php');
     $this->addFile(dirname(__FILE__) . '/live_test.php');
     $this->addFile(dirname(__FILE__) . '/acceptance_test.php');
 }
Exemplo n.º 5
0
 public function ExtensionsTests()
 {
     $this->TestSuite('Extension tests for SimpleTest ' . SimpleTest::getVersion());
     $nodes = new RecursiveDirectoryIterator(dirname(__FILE__) . '/../extensions/');
     foreach (new RecursiveIteratorIterator($nodes) as $node) {
         if (preg_match('/test\\.php$/', $node->getFilename())) {
             $this->addFile($node->getPathname());
         }
     }
 }
Exemplo n.º 6
0
 public function __construct()
 {
     parent::__construct('All tests for SimpleTest ' . SimpleTest::getVersion());
     $this->addFile(dirname(__FILE__) . '/unit_tests.php');
     $this->addFile(dirname(__FILE__) . '/shell_test.php');
     $this->addFile(dirname(__FILE__) . '/live_test.php');
     // jakoch: disabled acceptance tests.
     // because, we will not test against a live server over the network.
     //$this->addFile(dirname(__FILE__) . '/acceptance_test.php');
 }
Exemplo n.º 7
0
 public function __construct()
 {
     parent::__construct('All tests for SimpleTest ' . SimpleTest::getVersion());
     $this->addFile(dirname(__FILE__) . '/unit_tests.php');
     $this->addFile(dirname(__FILE__) . '/shell_test.php');
     $this->addFile(dirname(__FILE__) . '/live_test.php');
     // The acceptance tests "examples" are served via PHP's built-in webserver,
     // which is available from PHP5.4 on.
     if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
         $this->addFile(dirname(__FILE__) . '/acceptance_test.php');
     }
 }
Exemplo n.º 8
0
 function __construct()
 {
     /*
     And a little hack to make sure PHP does not timeout
     */
     //   http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time
     set_time_limit(max(5 * 60, ini_get('max_execution_time')));
     parent::__construct('All tests for SimpleTest ' . SimpleTest::getVersion());
     $this->addFile(dirname(__FILE__) . '/unit_tests.php');
     $this->addFile(dirname(__FILE__) . '/shell_test.php');
     $this->addFile(dirname(__FILE__) . '/live_test.php');
     $this->addFile(dirname(__FILE__) . '/acceptance_test.php');
 }
Exemplo n.º 9
0
 public function __construct()
 {
     parent::__construct('All tests for SimpleTest ' . SimpleTest::getVersion());
     $this->addFile(__DIR__ . '/unit_tests.php');
     $this->addFile(__DIR__ . '/shell_test.php');
     /**
      * The "live" and "acceptance" tests require a running local webserver on "localhost:8080".
      * We are using PHP's built-in webserver to serve the "test/site".
      * The start command for the server is: `php -S localhost:8080 -t test/site`.
      */
     $this->addFile(__DIR__ . '/live_test.php');
     $this->addFile(__DIR__ . '/acceptance_test.php');
 }
Exemplo n.º 10
0
 function AllTests()
 {
     $this->TestSuite('All tests for evalcomix_tool ' . SimpleTest::getVersion());
     $this->addFile(dirname(__FILE__) . '/testevalcomix_tool.php');
     $this->addFile(dirname(__FILE__) . '/testevalcomix.php');
     $this->addFile(dirname(__FILE__) . '/testevalcomix_assessments.php');
     $this->addFile(dirname(__FILE__) . '/testevalcomix_modes.php');
     $this->addFile(dirname(__FILE__) . '/testevalcomix_modes_extra.php');
     $this->addFile(dirname(__FILE__) . '/testevalcomix_modes_time.php');
     $this->addFile(dirname(__FILE__) . '/testevalcomix_tasks.php');
     //$this->addFile(dirname(__FILE__) . '/testwebservice_evalcomix_client.php');
     $this->addFile(dirname(__FILE__) . '/testcalculator_average.php');
 }
Exemplo n.º 11
0
 protected function Form_Create()
 {
     $filesToSkip = array("QUnitTestCaseBase.php", "QTestForm.tpl.php");
     $arrFiles = QFolder::listFilesInFolder(__QCUBED_CORE__ . '/tests/qcubed-unit/');
     $arrTests = array();
     foreach ($arrFiles as $filename) {
         if (!in_array($filename, $filesToSkip)) {
             require_once __QCUBED_CORE__ . '/tests/qcubed-unit/' . $filename;
             $arrTests[] = str_replace(".php", "", $filename);
         }
     }
     $suite = new TestSuite('QCubed ' . QCUBED_VERSION_NUMBER_ONLY . ' Unit Tests - SimpleTest ' . SimpleTest::getVersion());
     foreach ($arrTests as $className) {
         $suite->add(new $className($this));
     }
     $suite->run(new QHtmlReporter());
 }
Exemplo n.º 12
0
 function AllTests()
 {
     set_time_limit(500);
     $this->TestSuite('All PHP MySpace Test ' . SimpleTest::getVersion());
     $this->addFile(dirname(__FILE__) . '\\CurrentUserIdTest.php');
     $this->addFile(dirname(__FILE__) . '\\AlbumTest.php');
     $this->addFile(dirname(__FILE__) . '\\MediaItemTest.php');
     $this->addFile(dirname(__FILE__) . '\\MediaItemCommentsTest.php');
     $this->addFile(dirname(__FILE__) . '\\ActivitiesTest.php');
     $this->addFile(dirname(__FILE__) . '\\AppDataTest.php');
     $this->addFile(dirname(__FILE__) . '\\GroupTest.php');
     $this->addFile(dirname(__FILE__) . '\\PeopleTest.php');
     $this->addFile(dirname(__FILE__) . '\\NotificationTest.php');
     $this->addFile(dirname(__FILE__) . '\\StatusMoodTest.php');
     $this->addFile(dirname(__FILE__) . '\\ProfileCommentsTest.php');
     $this->addFile(dirname(__FILE__) . '\\OpenSearchTest.php');
     $this->addFile(dirname(__FILE__) . '\\PortableContactsTest.php');
     $this->addFile(dirname(__FILE__) . '\\SubscriptionTest.php');
 }
Exemplo n.º 13
0
 /**
  * Output anything that should appear below all the test output, e.g. summary information.
  */
 function paintFooter($test_name)
 {
     $summarydata = new stdClass();
     $summarydata->run = $this->getTestCaseProgress();
     $summarydata->total = $this->getTestCaseCount();
     $summarydata->passes = $this->getPassCount();
     $summarydata->fails = $this->getFailCount();
     $summarydata->exceptions = $this->getExceptionCount();
     if ($summarydata->fails == 0 && $summarydata->exceptions == 0) {
         $status = "passed";
     } else {
         $status = "failed";
     }
     echo '<div class="unittestsummary ', $status, '">';
     echo $this->get_string('summary', $summarydata);
     echo '</div>';
     echo '<div class="performanceinfo">', $this->get_string('runat', userdate($this->timestart)), ' ', $this->get_string('timetakes', format_time(time() - $this->timestart)), ' ', $this->get_string('version', SimpleTest::getVersion()), '</div>';
 }
Exemplo n.º 14
0
 public function setUp()
 {
     $this->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion());
 }
Exemplo n.º 15
0
 /**
  *    Creates the user agent part of the request.
  *    @return string          Host line content.
  *    @access protected
  */
 protected function getAgentLine()
 {
     return 'User-Agent: ' . (empty($this->useragent) ? 'SimpleTest ' . SimpleTest::getVersion() : $this->useragent);
 }