[PHP-CVS] svn: /php/phpruntests/trunk/ build.xml
spriebschTue, 08 Sep 2009 20:48:17 + Revision: http://svn.php.net/viewvc?view=revision&revision=288169 Log: Added missing -n command line switches to compare task in build.xml. Changed paths: U php/phpruntests/trunk/build.xml Modified: php/phpruntests/trunk/build.xml === --- php/phpruntests/trunk/build.xml 2009-09-08 20:43:56 UTC (rev 288168) +++ php/phpruntests/trunk/build.xml 2009-09-08 20:48:17 UTC (rev 288169) @@ -60,8 +60,8 @@ - - + + -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: php/phpruntests/trunk/ src/configuration/rtCommandLineOptions.php src/configuration/rtIniAsCommandLineArgs.php src/configuration/rtPreConditionList.php src/rtText.php src/testcase/rtPhp
spriebschThu, 23 Jul 2009 11:32:38 + Revision: http://svn.php.net/viewvc?view=revision&revision=284642 Log: Switched remaining exceptions to rtException. Changed paths: U php/phpruntests/trunk/src/configuration/rtCommandLineOptions.php U php/phpruntests/trunk/src/configuration/rtIniAsCommandLineArgs.php U php/phpruntests/trunk/src/configuration/rtPreConditionList.php U php/phpruntests/trunk/src/rtText.php U php/phpruntests/trunk/src/testcase/rtPhpRunner.php U php/phpruntests/trunk/src/testcase/sections/executablesections/rtCleanSection.php U php/phpruntests/trunk/src/testcase/sections/executablesections/rtFileSection.php U php/phpruntests/trunk/src/testcase/sections/executablesections/rtSkipIfSection.php U php/phpruntests/trunk/src/testcase/sections/rtSection.php U php/phpruntests/trunk/tests/configuration/rtCommandLineOptionsTest.php U php/phpruntests/trunk/tests/configuration/rtIniAsCommandLineArgsTest.php U php/phpruntests/trunk/tests/testcase/sections/rtSectionTest.php Modified: php/phpruntests/trunk/src/configuration/rtCommandLineOptions.php === --- php/phpruntests/trunk/src/configuration/rtCommandLineOptions.php 2009-07-23 11:14:57 UTC (rev 284641) +++ php/phpruntests/trunk/src/configuration/rtCommandLineOptions.php 2009-07-23 11:32:38 UTC (rev 284642) @@ -156,7 +156,7 @@ } if (!in_array($option, array_merge($this->shortOptions, $this->shortOptionsWithArgs, $this->longOptions, $this->longOptionsWithArgs))) { -throw new rtUnknownOptionException('Unknown option ' . $argv[$i]); +throw new rtException('Unknown option ' . $argv[$i]); } if (in_array($option, array_merge($this->shortOptions, $this->longOptions))) { @@ -165,7 +165,7 @@ } if (!$this->isValidOptionArg($argv, $i + 1)) { -throw new rtMissingArgumentException('Missing argument for command line option ' . $argv[$i]); +throw new rtException('Missing argument for command line option ' . $argv[$i]); } $i++; Modified: php/phpruntests/trunk/src/configuration/rtIniAsCommandLineArgs.php === --- php/phpruntests/trunk/src/configuration/rtIniAsCommandLineArgs.php 2009-07-23 11:14:57 UTC (rev 284641) +++ php/phpruntests/trunk/src/configuration/rtIniAsCommandLineArgs.php 2009-07-23 11:32:38 UTC (rev 284642) @@ -68,7 +68,7 @@ $setting = $this->stripSpaces($setting); $args .= " -d \"$setting\""; } else { -throw new rtUnknownIniSettingException("Invalid INI setting $setting"); +throw new rtException("Invalid INI setting $setting"); } } Modified: php/phpruntests/trunk/src/configuration/rtPreConditionList.php === --- php/phpruntests/trunk/src/configuration/rtPreConditionList.php 2009-07-23 11:14:57 UTC (rev 284641) +++ php/phpruntests/trunk/src/configuration/rtPreConditionList.php 2009-07-23 11:32:38 UTC (rev 284642) @@ -54,7 +54,7 @@ $p = new $preCon; if (!$p->check($config)) { -throw new Exception($p->getMessage()); +throw new rtException($p->getMessage()); } } Modified: php/phpruntests/trunk/src/rtText.php === --- php/phpruntests/trunk/src/rtText.php 2009-07-23 11:14:57 UTC (rev 284641) +++ php/phpruntests/trunk/src/rtText.php 2009-07-23 11:32:38 UTC (rev 284642) @@ -29,7 +29,7 @@ $filename = dirname(__FILE__) . '/texts/' . $name . '.txt'; if (!file_exists($filename)) { -throw new LogicException('The text ' . $name . ' does not exist'); +throw new rtException('The text ' . $name . ' does not exist'); } $text = file_get_contents($filename); Modified: php/phpruntests/trunk/src/testcase/rtPhpRunner.php === --- php/phpruntests/trunk/src/testcase/rtPhpRunner.php 2009-07-23 11:14:57 UTC (rev 284641) +++ php/phpruntests/trunk/src/testcase/rtPhpRunner.php 2009-07-23 11:32:38 UTC (rev 284642) @@ -49,7 +49,7 @@ ); if (!$proc) { -throw new rtPhpRunnerException('Failed to open process to run PHP code in rtPhpRunner'); +throw new rtException('Failed to open process to run PHP code in rtPhpRunner'); } if (!is_null($this->stdin)) { @@ -67,10 +67,10 @@ $n = @stream_select($r, $w, $e, $this->timeOut); if ($n === false) { -throw new rtPhpRunnerException('Stream select failure in rtPhpRunner'); +throw new rtException('St
[PHP-CVS] svn: php/phpruntests/trunk/ build.xml
spriebschThu, 23 Jul 2009 08:38:12 + Revision: http://svn.php.net/viewvc?view=revision&revision=284638 Log: Modified build automation run phpt's in /tmp directory. Added new/new comparison with baseline linux results. Changed paths: U php/phpruntests/trunk/build.xml Modified: php/phpruntests/trunk/build.xml === --- php/phpruntests/trunk/build.xml 2009-07-23 07:38:29 UTC (rev 284637) +++ php/phpruntests/trunk/build.xml 2009-07-23 08:38:12 UTC (rev 284638) @@ -53,15 +53,19 @@ - - - - + + - - - - + + + + + + + + + + -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: php/phpruntests/trunk/ Doxyfile build.xml
spriebsch Mon, 20 Jul 2009 14:48:02 + Revision: http://svn.php.net/viewvc?view=revision&revision=284440 Changed paths: U php/phpruntests/trunk/Doxyfile U php/phpruntests/trunk/build.xml Log: Improved build automation. Modified: php/phpruntests/trunk/Doxyfile === --- php/phpruntests/trunk/Doxyfile 2009-07-20 14:38:48 UTC (rev 284439) +++ php/phpruntests/trunk/Doxyfile 2009-07-20 14:48:02 UTC (rev 284440) @@ -38,7 +38,7 @@ # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = docs +OUTPUT_DIRECTORY = _docs # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output @@ -647,7 +647,7 @@ # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. -SOURCE_BROWSER = NO +SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. @@ -658,19 +658,19 @@ # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. -STRIP_CODE_COMMENTS= YES +STRIP_CODE_COMMENTS= NO # If the REFERENCED_BY_RELATION tag is set to YES # then for each documented function all documented # functions referencing it will be listed. -REFERENCED_BY_RELATION = NO +REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES # then for each documented function all documented entities # called/used by that function will be listed. -REFERENCES_RELATION= NO +REFERENCES_RELATION= YES # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from @@ -691,7 +691,7 @@ # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. -VERBATIM_HEADERS = YES +VERBATIM_HEADERS = NO #--- # configuration options related to the alphabetical class index @@ -701,7 +701,7 @@ # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. -ALPHABETICAL_INDEX = NO +ALPHABETICAL_INDEX = YES # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns @@ -867,7 +867,7 @@ # releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE # respectively. -GENERATE_TREEVIEW = NONE +GENERATE_TREEVIEW = FRAME # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree @@ -1117,7 +1117,7 @@ # evaluate all C-preprocessor directives found in the sources and include # files. -ENABLE_PREPROCESSING = YES +ENABLE_PREPROCESSING = NO # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional @@ -1135,7 +1135,7 @@ # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. -SEARCH_INCLUDES= YES +SEARCH_INCLUDES= NO # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by @@ -1321,7 +1321,7 @@ # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. -CALL_GRAPH = NO +CALL_GRAPH = YES # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function @@ -1329,7 +1329,7 @@ # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. -CALLER_GRAPH = NO +CALLER_GRAPH = YES # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. Modified: php/phpruntests/trunk/build.xml === --- php/phpruntests/trunk/build.xml 2009-07-20 14:38:48 UTC (rev 284439) +++ php/phpruntests/trunk/build.xml 2009-07-20 14:48:02 UTC (rev 284440) @@ -1,23 +1,35 @@ - + - + + + + + + + + + + + + + - - - + + + - - + + - + @@ -26,32 +38,37 @@ - -
[PHP-CVS] cvs: phpruntests /src/configuration rtPreConditionList.php /tests/configuration rtPreconditionListTest.php
spriebsch Wed May 13 11:10:55 2009 UTC Modified files: /phpruntests/src/configuration rtPreConditionList.php /phpruntests/tests/configurationrtPreconditionListTest.php Log: Fixed test and removed obsolete code from rtPreConditionList. http://cvs.php.net/viewvc.cgi/phpruntests/src/configuration/rtPreConditionList.php?r1=1.4&r2=1.5&diff_format=u Index: phpruntests/src/configuration/rtPreConditionList.php diff -u phpruntests/src/configuration/rtPreConditionList.php:1.4 phpruntests/src/configuration/rtPreConditionList.php:1.5 --- phpruntests/src/configuration/rtPreConditionList.php:1.4Wed May 6 20:45:42 2009 +++ phpruntests/src/configuration/rtPreConditionList.phpWed May 13 11:10:54 2009 @@ -25,7 +25,7 @@ static public function getInstance($os = 'Unix') { if ($os == 'Windows') { -return new rtWinPreconditionList('Windows'); +return new rtWinPreConditionList(); } else { return new rtUnixPreConditionList(); } @@ -37,34 +37,19 @@ * @param rtCommandLineOptions $commandLine * @param rtEnvironmentVariables $environmentVariables * @return boolean + * @todo modify to check all preconditions, and return a list of failed ones */ public function check(rtRuntestsConfiguration $config) { foreach ($this->preConditions as $preCon) { $p = new $preCon; -// if (!$p->check($commandLine, $environmentVariables)) { if (!$p->check($config)) { -die($p->getMessage()); +throw new Exception($p->getMessage()); } } return true; } - -/** - * Test to ensure that a particular pre-condition exists (used in testing) - * - * @param string $pc - * @return boolean - */ -public function hasPreCondition($pc) -{ -if (in_array($pc, $this->preConditions)) { -return true; -} - -return false; -} } ?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/rtPreconditionListTest.php?r1=1.3&r2=1.4&diff_format=u Index: phpruntests/tests/configuration/rtPreconditionListTest.php diff -u phpruntests/tests/configuration/rtPreconditionListTest.php:1.3 phpruntests/tests/configuration/rtPreconditionListTest.php:1.4 --- phpruntests/tests/configuration/rtPreconditionListTest.php:1.3 Fri Apr 24 09:42:01 2009 +++ phpruntests/tests/configuration/rtPreconditionListTest.php Wed May 13 11:10:54 2009 @@ -1,36 +1,65 @@ + * @authorStefan Priebsch + * @copyright 2009 The PHP Group + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @link http://qa.php.net/ + */ require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../src/rtAutoload.php'; +/** + * Tests for rtPreCondtionListTest precondition. + * + * @category Testing + * @package RUNTESTS + * @authorZoe Slattery + * @authorStefan Priebsch + * @copyright 2009 The PHP Group + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @link http://qa.php.net/ + */ class rtPreCondtionListTest extends PHPUnit_Framework_TestCase { -protected $clo; -protected $env; -protected $ge; - -public function setUp() +protected function setUp() { -$this->clo = new rtCommandLineOptions(); -$this->clo->parse(array('run-tests.php', '-p', 'some-php-exe', 'a-test.phpt')); +$this->preConditionList = rtPreConditionList::getInstance(); +} -$this->env = rtEnvironmentVariables::getInstance(); -$this->env->getUserSuppliedVariables(); +protected function tearDown() +{ +unset($this->preConditionList); } public function testCheck() { -$sl = rtPreConditionList::getInstance(); +$php = trim(shell_exec("which php")); + +$preConditionList = rtPreConditionList::getInstance(); +$runtestsConfiguration = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $php, 'a-test.phpt')); +$runtestsConfiguration->configure(); + +$this->assertTrue($preConditionList->check($runtestsConfiguration)); +} + +public function testGetInstanceOnUnix() +{ +$preConditionList = rtPreConditionList::getInstance('Unix'); -$this->assertTrue($sl->check($this->clo, $this->env)); +$this->assertTrue($preConditionList instanceOf rtUnixPreConditionList); } -public function testUnix() +public function testGetInstanceOnWindows() { -$sl = rtPreConditionList::getInstance(); -$sl->adaptList(); +$preConditionLis
[PHP-CVS] cvs: phpruntests /src/configuration rtRuntestsConfiguration.php
spriebsch Wed May 13 11:08:32 2009 UTC Modified files: /phpruntests/src/configuration rtRuntestsConfiguration.php Log: Moved factory method for better readability. http://cvs.php.net/viewvc.cgi/phpruntests/src/configuration/rtRuntestsConfiguration.php?r1=1.8&r2=1.9&diff_format=u Index: phpruntests/src/configuration/rtRuntestsConfiguration.php diff -u phpruntests/src/configuration/rtRuntestsConfiguration.php:1.8 phpruntests/src/configuration/rtRuntestsConfiguration.php:1.9 --- phpruntests/src/configuration/rtRuntestsConfiguration.php:1.8 Wed May 13 01:36:57 2009 +++ phpruntests/src/configuration/rtRuntestsConfiguration.php Wed May 13 11:08:32 2009 @@ -46,6 +46,20 @@ 'PhpCommandLineArguments' => 'rtPhpCommandLineArgSetting', ); +/** + * Factory: returns rtRuntestsConfiguration subclass for the given os. + * + * @returns rtEnvironment + */ +static public function getInstance ($commandLineArgs, $os = 'Unix') +{ +if ($os == 'Windows') { +return new rtWinConfiguration($commandLineArgs); +} else { +return new rtUnixConfiguration($commandLineArgs); +} +} + protected function init() { //parse command line @@ -58,7 +72,7 @@ } /** - * @todo spriebsch: is configure() the right name for this method, it checks preconditions? + * */ public function configure() { @@ -71,28 +85,6 @@ $object = new $className($this); $this->settings[$name] = $object->get(); } - //1 var_dump($this->settings); - -//check configuration preconditions -$preConditionList = rtPreConditionList::getInstance(); - -// $preConditionList->check($this->commandLine, $this->environmentVariables); - -$preConditionList->check($this); -} - -/** - * Factory: returns rtRuntestsConfiguration subclass for the given os. - * - * @returns rtEnvironment - */ -static public function getInstance ($commandLineArgs, $os = 'Unix') -{ -if ($os == 'Windows') { -return new rtWinConfiguration($commandLineArgs); -} else { -return new rtUnixConfiguration($commandLineArgs); -} } /** -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: phpruntests /tests/configuration/preconditions rtIsTestFileSpecifiedTest.php
spriebsch Tue May 12 23:20:28 2009 UTC Modified files: /phpruntests/tests/configuration/preconditions rtIsTestFileSpecifiedTest.php Log: Fixed test to work with refactored rtRuntestsConfiguration. http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/preconditions/rtIsTestFileSpecifiedTest.php?r1=1.3&r2=1.4&diff_format=u Index: phpruntests/tests/configuration/preconditions/rtIsTestFileSpecifiedTest.php diff -u phpruntests/tests/configuration/preconditions/rtIsTestFileSpecifiedTest.php:1.3 phpruntests/tests/configuration/preconditions/rtIsTestFileSpecifiedTest.php:1.4 --- phpruntests/tests/configuration/preconditions/rtIsTestFileSpecifiedTest.php:1.3 Fri Apr 24 09:42:01 2009 +++ phpruntests/tests/configuration/preconditions/rtIsTestFileSpecifiedTest.php Tue May 12 23:20:28 2009 @@ -1,69 +1,81 @@ + * @author Stefan Priebsch + * @copyright 2009 The PHP Group + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @link http://qa.php.net/ + */ require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../src/rtAutoload.php'; +/** + * Tests for rtIsTestFileSpecifiedTest precondition. + * + * @category Testing + * @package RUNTESTS + * @authorZoe Slattery + * @authorStefan Priebsch + * @copyright 2009 The PHP Group + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @link http://qa.php.net/ + */ class rtIsTestFileSpecifiedTest extends PHPUnit_Framework_TestCase { -public function testClOptionR() +protected function setUp() +{ +$this->preCondition = new rtIsTestFileSpecified(); +} + +protected function tearDown() { -$env = rtEnvironmentVariables::getInstance(); -$clo = new rtCommandLineOptions(); -$clo->parse(array('run-tests.php', '-r', 'some-file')); +unset($this->preCondition); +} -$pre = new rtIsTestFileSpecified(); +public function testClOptionR() +{ +$runtestsConfiguration = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-r', 'some-file')); -$this->assertTrue($pre->check($clo, $env)); +$this->assertTrue($this->preCondition->check($runtestsConfiguration)); } public function testCLOptionL() { -$env = rtEnvironmentVariables::getInstance(); -$clo = new rtCommandLineOptions(); -$clo->parse(array('run-tests.php', '-l', 'some-file')); - -$pre = new rtIsTestFileSpecified(); +$runtestsConfiguration = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-l', 'some-file')); -$this->assertTrue($pre->check($clo, $env)); +$this->assertTrue($this->preCondition->check($runtestsConfiguration)); } public function testCLOptionFileName() { -$env = rtEnvironmentVariables::getInstance(); -$clo = new rtCommandLineOptions(); -$clo->parse(array('run-tests.php', 'some-test-file')); - -$pre = new rtIsTestFileSpecified(); +$runtestsConfiguration = rtRuntestsConfiguration::getInstance(array('run-tests.php', 'some-test-file')); -$this->assertTrue($pre->check($clo, $env)); +$this->assertTrue($this->preCondition->check($runtestsConfiguration)); } public function testEnvVar() { -$env = rtEnvironmentVariables::getInstance(); -$clo = new rtCommandLineOptions(); -$env->setvariable('TEST_PHP_USER', 'some-file'); +$runtestsConfiguration = rtRuntestsConfiguration::getInstance(array()); +$runtestsConfiguration->setEnvironmentVariable('TEST_PHP_USER', 'some-file'); -$pre = new rtIsTestFileSpecified(); - -$this->assertTrue($pre->check($clo, $env)); +$this->assertTrue($this->preCondition->check($runtestsConfiguration)); } public function testNotSpecified() { -$env = rtEnvironmentVariables::getInstance(); -$clo = new rtCommandLineOptions(); - -$pre = new rtIsTestFileSpecified(); +$runtestsConfiguration = rtRuntestsConfiguration::getInstance(array()); -$this->assertFalse($pre->check($clo, $env)); +$this->assertFalse($this->preCondition->check($runtestsConfiguration)); } -public function testGetText() +public function testGetMessage() { -$pre = new rtIsTestFileSpecified(); - -$this->assertEquals($pre->getMessage('missingTestFile'), rtText::get('missingTestFile')); + $this->assertEquals($this->preCondition->getMessage('missingTestFile'), rtText::get('missingTestFile')); } } ?> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: phpruntests /tests/configuration/preconditions rtIsSafeModeDisabledTest.php
spriebsch Tue May 12 22:56:22 2009 UTC Modified files: /phpruntests/tests/configuration/preconditions rtIsSafeModeDisabledTest.php Log: Fixed test to work with refactored rtRuntestsConfiguration. http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/preconditions/rtIsSafeModeDisabledTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/configuration/preconditions/rtIsSafeModeDisabledTest.php diff -u phpruntests/tests/configuration/preconditions/rtIsSafeModeDisabledTest.php:1.2 phpruntests/tests/configuration/preconditions/rtIsSafeModeDisabledTest.php:1.3 --- phpruntests/tests/configuration/preconditions/rtIsSafeModeDisabledTest.php:1.2 Mon Apr 20 20:50:39 2009 +++ phpruntests/tests/configuration/preconditions/rtIsSafeModeDisabledTest.php Tue May 12 22:56:22 2009 @@ -1,24 +1,52 @@ + * @author Stefan Priebsch + * @copyright 2009 The PHP Group + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @link http://qa.php.net/ + */ require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../src/rtAutoload.php'; +/** + * Tests for rtIsSafeModeDisabledTest precondition. + * + * @category Testing + * @package RUNTESTS + * @authorZoe Slattery + * @authorStefan Priebsch + * @copyright 2009 The PHP Group + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @link http://qa.php.net/ + */ class rtIssafeModeDisabledTest extends PHPUnit_Framework_TestCase { -public function testDisabled() +protected function setUp() { -$pre = new rtIsSafeModeDisabled(); +$this->preCondition = new rtIsSafeModeDisabled(); +} -$this->assertTrue($pre->check()); +protected function tearDown() +{ +unset($this->preCondition); } -public function testgetMessage() +public function testDisabled() { -$pre = new rtIsSafeModeDisabled(); +$runtestsConfiguration = rtRuntestsConfiguration::getInstance(array()); -$this->assertEquals($pre->getMessage('safeModeNotDisabled'), rtText::get('safeModeNotDisabled')); +$this->assertTrue($this->preCondition->check($runtestsConfiguration)); +} + +public function testGetMessage() +{ + $this->assertEquals($this->preCondition->getMessage('safeModeNotDisabled'), rtText::get('safeModeNotDisabled')); } - -//Not sure how to check if it is missing? } ?> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: phpruntests /tests/configuration/preconditions rtIsPcreLoadedTest.php
spriebsch Tue May 12 22:50:16 2009 UTC Modified files: /phpruntests/tests/configuration/preconditions rtIsPcreLoadedTest.php Log: Renamed test method for better readability. http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/preconditions/rtIsPcreLoadedTest.php?r1=1.3&r2=1.4&diff_format=u Index: phpruntests/tests/configuration/preconditions/rtIsPcreLoadedTest.php diff -u phpruntests/tests/configuration/preconditions/rtIsPcreLoadedTest.php:1.3 phpruntests/tests/configuration/preconditions/rtIsPcreLoadedTest.php:1.4 --- phpruntests/tests/configuration/preconditions/rtIsPcreLoadedTest.php:1.3 Tue May 12 22:45:47 2009 +++ phpruntests/tests/configuration/preconditions/rtIsPcreLoadedTest.php Tue May 12 22:50:16 2009 @@ -37,7 +37,7 @@ unset($this->preCondition); } -public function testLoaded() +public function testCheck() { $runtestsConfiguration = rtRuntestsConfiguration::getInstance(array()); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: phpruntests /tests/configuration/preconditions rtIsProcOpenAvailableTest.php
spriebsch Tue May 12 22:49:40 2009 UTC Modified files: /phpruntests/tests/configuration/preconditions rtIsProcOpenAvailableTest.php Log: Fixed test to work with refactored rtRuntestsConfiguration. http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/preconditions/rtIsProcOpenAvailableTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/configuration/preconditions/rtIsProcOpenAvailableTest.php diff -u phpruntests/tests/configuration/preconditions/rtIsProcOpenAvailableTest.php:1.2 phpruntests/tests/configuration/preconditions/rtIsProcOpenAvailableTest.php:1.3 --- phpruntests/tests/configuration/preconditions/rtIsProcOpenAvailableTest.php:1.2 Mon Apr 20 20:50:39 2009 +++ phpruntests/tests/configuration/preconditions/rtIsProcOpenAvailableTest.php Tue May 12 22:49:40 2009 @@ -1,15 +1,47 @@ + * @author Stefan Priebsch + * @copyright 2009 The PHP Group + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @link http://qa.php.net/ + */ require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../src/rtAutoload.php'; +/** + * Tests for rtIsProcOpenAvailableTest precondition. + * + * @category Testing + * @package RUNTESTS + * @authorZoe Slattery + * @authorStefan Priebsch + * @copyright 2009 The PHP Group + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @link http://qa.php.net/ + */ class rtIsProcOpenAvailableTest extends PHPUnit_Framework_TestCase { -public function testAvailable() +protected function setUp() { -$pre = new rtIsProcOpenAvailable(); +$this->preCondition = new rtIsProcOpenAvailable(); +} + +protected function tearDown() +{ +unset($this->preCondition); +} + +public function testCheck() +{ +$runtestsConfiguration = rtRuntestsConfiguration::getInstance(array()); -$this->assertTrue($pre->check()); +$this->assertEquals(function_exists('proc_open'), $this->preCondition->check($runtestsConfiguration)); } public function testgetMessage() @@ -18,7 +50,5 @@ $this->assertEquals($pre->getMessage('procOpenNotAvailable'), rtText::get('procOpenNotAvailable')); } - -//Not sure how to check if it is missing? } ?> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: phpruntests /tests/configuration/preconditions rtIsPcreLoadedTest.php
spriebsch Tue May 12 22:45:47 2009 UTC Modified files: /phpruntests/tests/configuration/preconditions rtIsPcreLoadedTest.php Log: Fixed test to work with refactored rtRuntestsConfiguration. http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/preconditions/rtIsPcreLoadedTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/configuration/preconditions/rtIsPcreLoadedTest.php diff -u phpruntests/tests/configuration/preconditions/rtIsPcreLoadedTest.php:1.2 phpruntests/tests/configuration/preconditions/rtIsPcreLoadedTest.php:1.3 --- phpruntests/tests/configuration/preconditions/rtIsPcreLoadedTest.php:1.2 Mon Apr 20 20:50:39 2009 +++ phpruntests/tests/configuration/preconditions/rtIsPcreLoadedTest.php Tue May 12 22:45:47 2009 @@ -1,22 +1,52 @@ + * @author Stefan Priebsch + * @copyright 2009 The PHP Group + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @link http://qa.php.net/ + */ require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../src/rtAutoload.php'; +/** + * Tests for rtIsPcreLoadedTest precondition. + * + * @category Testing + * @package RUNTESTS + * @authorZoe Slattery + * @authorStefan Priebsch + * @copyright 2009 The PHP Group + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @link http://qa.php.net/ + */ class rtIsPcreLoadedTest extends PHPUnit_Framework_TestCase { +protected function setUp() +{ +$this->preCondition = new rtIsPcreLoaded(); +} + +protected function tearDown() +{ +unset($this->preCondition); +} + public function testLoaded() { -$pre = new rtIsPcreLoaded(); -$this->assertTrue($pre->check()); +$runtestsConfiguration = rtRuntestsConfiguration::getInstance(array()); + +$this->assertEquals(extension_loaded('pcre'), $this->preCondition->check($runtestsConfiguration)); } -public function testgetMessage() +public function testGetMessage() { -$pre = new rtIsPcreLoaded(); -$this->assertEquals($pre->getMessage('pcreNotLoaded'), rtText::get('pcreNotLoaded')); +$this->assertEquals($this->preCondition->getMessage('pcreNotLoaded'), rtText::get('pcreNotLoaded')); } - -//Not sure how to check if it's not loaded? } ?> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: phpruntests /tests/configuration/preconditions rtIfParallelHasPcntlTest.php
spriebsch Tue May 12 22:41:20 2009 UTC Modified files: /phpruntests/tests/configuration/preconditions rtIfParallelHasPcntlTest.php Log: Fixed wrong case in method name. http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php?r1=1.5&r2=1.6&diff_format=u Index: phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php diff -u phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php:1.5 phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php:1.6 --- phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php:1.5 Tue May 12 22:28:57 2009 +++ phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php Tue May 12 22:41:20 2009 @@ -73,7 +73,7 @@ /** * Ensure that the error message is correct. */ -public function testgetMessage() +public function testGetMessage() { $this->assertEquals($this->preCondition->getMessage('pcntlNotLoaded'), rtText::get('pcntlNotLoaded')); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: phpruntests /tests/configuration/preconditions rtIfParallelHasPcntlTest.php
spriebsch Tue May 12 22:28:57 2009 UTC Modified files: /phpruntests/tests/configuration/preconditions rtIfParallelHasPcntlTest.php Log: Fixed test to work with refactored rtRuntestsConfiguration. http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php?r1=1.4&r2=1.5&diff_format=u Index: phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php diff -u phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php:1.4 phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php:1.5 --- phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php:1.4 Sat Apr 25 15:39:09 2009 +++ phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php Tue May 12 22:28:57 2009 @@ -30,16 +30,11 @@ protected function setUp() { $this->preCondition = new rtIfParallelHasPcntl(); -$this->commandLine = new rtCommandLineOptions(); - -$this->environment = rtEnvironmentVariables::getInstance(); } protected function tearDown() { unset($this->preCondition); -unset($this->commandLine); -unset($this->environment); } /** @@ -48,9 +43,9 @@ */ public function testCheckWhenCommandLineOptionIsSet() { -$this->commandLine->parse(array('run-tests.php', '-z')); +$runtestsConfiguration = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-z')); -$this->assertEquals(extension_loaded('pcntl'), $this->preCondition->check($this->commandLine, $this->environment)); +$this->assertEquals(extension_loaded('pcntl'), $this->preCondition->check($runtestsConfiguration)); } /** @@ -59,9 +54,10 @@ */ public function testCheckWhenEnvironmentVariableIsSet() { -$this->environment->setVariable('TEST_PHP_PARALLEL', true); +$runtestsConfiguration = rtRuntestsConfiguration::getInstance(array()); +$runtestsConfiguration->setEnvironmentVariable('TEST_PHP_PARALLEL', true); -$this->assertTrue($this->preCondition->check($this->commandLine, $this->environment)); +$this->assertTrue($this->preCondition->check($runtestsConfiguration)); } /** @@ -69,7 +65,9 @@ */ public function testCheckWhenParallelExecutionIsNotRequired() { -$this->assertTrue($this->preCondition->check($this->commandLine, $this->environment)); +$runtestsConfiguration = rtRuntestsConfiguration::getInstance(array()); + +$this->assertTrue($this->preCondition->check($runtestsConfiguration)); } /** -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: phpruntests /src/configuration rtRuntestsConfiguration.php rtSetting.php /src/configuration/settings rtPhpCgiExecutableSetting.php rtPhpExecutableSetting.php /tests/configuration/sett
spriebsch Tue May 12 09:15:19 2009 UTC Modified files: /phpruntests/tests/configuration/settings rtCurrentDirectorySettingTest.php rtLogFormatSettingTest.php rtPhpCgiExecutableSettingTest.php rtPhpCommandLineArgSettingTest.php rtPhpExecutableSettingTest.php rtTestDirectorySettingTest.php rtWorkingDirectorySettingTest.php /phpruntests/src/configuration rtRuntestsConfiguration.php rtSetting.php /phpruntests/src/configuration/settings rtPhpCgiExecutableSetting.php rtPhpExecutableSetting.php Log: Refactored rtRuntestsConfiguration and adjusted the unit tests. http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/settings/rtCurrentDirectorySettingTest.php?r1=1.3&r2=1.4&diff_format=u Index: phpruntests/tests/configuration/settings/rtCurrentDirectorySettingTest.php diff -u phpruntests/tests/configuration/settings/rtCurrentDirectorySettingTest.php:1.3 phpruntests/tests/configuration/settings/rtCurrentDirectorySettingTest.php:1.4 --- phpruntests/tests/configuration/settings/rtCurrentDirectorySettingTest.php:1.3 Sun Apr 26 06:54:34 2009 +++ phpruntests/tests/configuration/settings/rtCurrentDirectorySettingTest.php Tue May 12 09:15:18 2009 @@ -8,9 +8,9 @@ public function testSetting() { $configuration = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', 'a-php-exe', 'test.phpt')); -$dirsetting = new rtCurrentDirectorySetting($configuration); +$setting = new rtCurrentDirectorySetting($configuration); -$this->assertEquals(realpath(getcwd()), $dirsetting->get()); +$this->assertEquals(realpath(getcwd()), $setting->get()); } } ?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/settings/rtLogFormatSettingTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/configuration/settings/rtLogFormatSettingTest.php diff -u phpruntests/tests/configuration/settings/rtLogFormatSettingTest.php:1.2 phpruntests/tests/configuration/settings/rtLogFormatSettingTest.php:1.3 --- phpruntests/tests/configuration/settings/rtLogFormatSettingTest.php:1.2 Mon Apr 20 20:50:39 2009 +++ phpruntests/tests/configuration/settings/rtLogFormatSettingTest.php Tue May 12 09:15:18 2009 @@ -9,16 +9,16 @@ $configuration = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', 'a-php-exe', 'test.phpt')); $configuration->setEnvironmentVariable('TEST_PHP_LOG_FORMAT', 'some-log-format'); -$logsetting = new rtLogFormatSetting($configuration); +$setting = new rtLogFormatSetting($configuration); -$this->assertEquals('SOME-LOG-FORMAT', $logsetting->get()); +$this->assertEquals('SOME-LOG-FORMAT', $setting->get()); } public function testSetLEOD() { $configuration = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', 'a-php-exe', 'test.phpt')); -$logsetting = new rtLogFormatSetting($configuration); +$setting = new rtLogFormatSetting($configuration); -$this->assertEquals('LEOD', $logsetting->get()); +$this->assertEquals('LEOD', $setting->get()); } } ?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/settings/rtPhpCgiExecutableSettingTest.php?r1=1.4&r2=1.5&diff_format=u Index: phpruntests/tests/configuration/settings/rtPhpCgiExecutableSettingTest.php diff -u phpruntests/tests/configuration/settings/rtPhpCgiExecutableSettingTest.php:1.4 phpruntests/tests/configuration/settings/rtPhpCgiExecutableSettingTest.php:1.5 --- phpruntests/tests/configuration/settings/rtPhpCgiExecutableSettingTest.php:1.4 Sun Apr 26 06:54:34 2009 +++ phpruntests/tests/configuration/settings/rtPhpCgiExecutableSettingTest.php Tue May 12 09:15:18 2009 @@ -8,27 +8,31 @@ public function testSetPhpCgiExecutableEV() { $configuration = rtRuntestsConfiguration::getInstance(array('run-tests.php', 'test.phpt')); $configuration->setEnvironmentVariable('TEST_PHP_CGI_EXECUTABLE', 'a-php-executable'); -$cgisetting = new rtPhpCgiExecutableSetting($configuration); -$this->assertEquals('a-php-executable', $cgisetting->get()); +$setting = new rtPhpCgiExecutableSetting($configuration); + +$this->assertEquals('a-php-executable', $setting->get()); } public function testSetPhpCgiExecutableEVAuto() { -$configuration = rtRuntestsConfiguration::getInstance(array('run-tests.php','-p', 'a-php-exe', 'test.phpt'));
[PHP-CVS] cvs: phpruntests /src/configuration rtCommandLineOptions.php
spriebsch Mon May 11 21:28:16 2009 UTC Modified files: /phpruntests/src/configuration rtCommandLineOptions.php Log: Added comments. http://cvs.php.net/viewvc.cgi/phpruntests/src/configuration/rtCommandLineOptions.php?r1=1.3&r2=1.4&diff_format=u Index: phpruntests/src/configuration/rtCommandLineOptions.php diff -u phpruntests/src/configuration/rtCommandLineOptions.php:1.3 phpruntests/src/configuration/rtCommandLineOptions.php:1.4 --- phpruntests/src/configuration/rtCommandLineOptions.php:1.3 Fri Apr 24 08:41:25 2009 +++ phpruntests/src/configuration/rtCommandLineOptions.php Mon May 11 21:28:16 2009 @@ -10,7 +10,7 @@ class rtCommandLineOptions { /** - * + * @var array */ protected $shortOptions = array( 'n', @@ -22,6 +22,9 @@ 'z', //parallel - run out of obvious letters ); +/** + * @var array + */ protected $shortOptionsWithArgs = array( 'l', 'r', @@ -33,6 +36,9 @@ 's', ); +/** + * @var array + */ protected $longOptions = array( 'verbose', 'help', @@ -52,6 +58,9 @@ 'no-clean', ); +/** + * @var array + */ protected $longOptionsWithArgs = array( 'html', 'temp-source', @@ -59,24 +68,54 @@ 'set-timeout', ); +/** + * @var array + */ protected $options = array(); +/** + * @var array + */ protected $testFilename = array(); +/** + * Constructs the object + */ public function __construct() { } +/** + * Parse the command line options + * + * @param array $argv Command line arguments + * @return void + */ public function parse($argv) { $this->parseCommandLineOptions($this->stripSpaces($argv)); } +/** + * Returns true when argument is a short option, + * i.e. begins with -. To differentiate from long option (--) + * we also look at the second character, which may not be a - character. + * + * @param string $arg Single command line argument + * @return bool + */ protected function isShortOption($arg) { return (substr($arg, 0, 1) == '-') && (substr($arg, 1, 1) != '-'); } +/** + * Returns true when argument is a long option, + * i.e. begins with -- + * + * @param string $arg Single command line argument + * @return bool + */ protected function isLongOption($arg) { return substr($arg, 0, 2) == '--'; @@ -89,6 +128,9 @@ * --{longOption} * --{longOptionWithArg} {arg} * file name|directory name + * + * @param array $argv Command line arguments + * @return void */ public function parseCommandLineOptions($argv) { @@ -123,10 +165,11 @@ } } - /** * Checks to make sure that the arument following does not begin with "-" - * @param string - argument + * + * @param array $array arguments + * @param string $index array index * @return bool */ public function isValidOptionArg($array, $index) @@ -159,7 +202,9 @@ /** + * Returns the value of given option. * + * @param string $option option name */ public function getOption($option) { @@ -172,7 +217,10 @@ /** - * Check whether an option exists + * Check whether an option exists. + * + * @param string $option option name + * @return bool */ public function hasOption($option) { @@ -181,7 +229,9 @@ /** - * Return the array containing file names or directory names to be tested + * Return the array containing file names or directory names to be tested. + * + * @return string */ public function getTestFilename() { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: phpruntests /src BuildClassMap.php
spriebsch Mon May 11 13:20:55 2009 UTC Modified files: /phpruntests/srcBuildClassMap.php Log: Added "generated file" comment to generated class map file. http://cvs.php.net/viewvc.cgi/phpruntests/src/BuildClassMap.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/src/BuildClassMap.php diff -u phpruntests/src/BuildClassMap.php:1.2 phpruntests/src/BuildClassMap.php:1.3 --- phpruntests/src/BuildClassMap.php:1.2 Fri Apr 24 08:41:25 2009 +++ phpruntests/src/BuildClassMap.php Mon May 11 13:20:55 2009 @@ -1,5 +1,5 @@ getSourceList($thisDir); -$mapString = ' ".'\''.$relativeLocation.'\','."\n"; } -$mapString .= ' );'."\n"; +$mapString .= ');'."\n"; $mapString .= '?>'."\n"; file_put_contents($thisDir.'/rtClassMap.php', $mapString); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: phpruntests /src/configuration rtPreCondition.php
spriebsch Mon May 11 11:29:30 2009 UTC Modified files: /phpruntests/src/configuration rtPreCondition.php Log: Fixed incompatible method signature. http://cvs.php.net/viewvc.cgi/phpruntests/src/configuration/rtPreCondition.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/src/configuration/rtPreCondition.php diff -u phpruntests/src/configuration/rtPreCondition.php:1.2 phpruntests/src/configuration/rtPreCondition.php:1.3 --- phpruntests/src/configuration/rtPreCondition.php:1.2Mon Apr 20 20:24:30 2009 +++ phpruntests/src/configuration/rtPreCondition.phpMon May 11 11:29:30 2009 @@ -18,7 +18,7 @@ * * @return boolean */ -public function check(rtCommandLineOptions $commandLine = null, rtEnvironmentVariables $environmentVariables = null) +public function check(rtRuntestsConfiguration $config) { return true; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: phpruntests /tests/testcase rtCleanExecutionTest.php rtCookieExecutionTest.php rtDeflatePostExecutionTest.php rtGetExecutionTest.php rtGzipPostExecutionTest.php rtPhpRunnerTest.php rtPo
spriebsch Mon May 11 11:03:26 2009 UTC Modified files: /phpruntests/tests/testcase rtCleanExecutionTest.php rtCookieExecutionTest.php rtDeflatePostExecutionTest.php rtGetExecutionTest.php rtGzipPostExecutionTest.php rtPhpRunnerTest.php rtPostExecutionTest.php rtPostRawExecutionTest.php Log: Removed surplus ?> at file end. http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/rtCleanExecutionTest.php?r1=1.3&r2=1.4&diff_format=u Index: phpruntests/tests/testcase/rtCleanExecutionTest.php diff -u phpruntests/tests/testcase/rtCleanExecutionTest.php:1.3 phpruntests/tests/testcase/rtCleanExecutionTest.php:1.4 --- phpruntests/tests/testcase/rtCleanExecutionTest.php:1.3 Fri Apr 24 09:42:01 2009 +++ phpruntests/tests/testcase/rtCleanExecutionTest.php Mon May 11 11:03:26 2009 @@ -76,6 +76,5 @@ $this->assertTrue(file_exists($fileName)); } -} - +} ?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/rtCookieExecutionTest.php?r1=1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/rtCookieExecutionTest.php diff -u phpruntests/tests/testcase/rtCookieExecutionTest.php:1.1 phpruntests/tests/testcase/rtCookieExecutionTest.php:1.2 --- phpruntests/tests/testcase/rtCookieExecutionTest.php:1.1Mon May 4 17:02:37 2009 +++ phpruntests/tests/testcase/rtCookieExecutionTest.phpMon May 11 11:03:26 2009 @@ -50,7 +50,5 @@ } -} - +} ?> -?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/rtDeflatePostExecutionTest.php?r1=1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/rtDeflatePostExecutionTest.php diff -u phpruntests/tests/testcase/rtDeflatePostExecutionTest.php:1.1 phpruntests/tests/testcase/rtDeflatePostExecutionTest.php:1.2 --- phpruntests/tests/testcase/rtDeflatePostExecutionTest.php:1.1 Thu Apr 30 20:22:22 2009 +++ phpruntests/tests/testcase/rtDeflatePostExecutionTest.php Mon May 11 11:03:26 2009 @@ -49,7 +49,5 @@ } -} - +} ?> -?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/rtGetExecutionTest.php?r1=1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/rtGetExecutionTest.php diff -u phpruntests/tests/testcase/rtGetExecutionTest.php:1.1 phpruntests/tests/testcase/rtGetExecutionTest.php:1.2 --- phpruntests/tests/testcase/rtGetExecutionTest.php:1.1 Sun Apr 26 22:44:55 2009 +++ phpruntests/tests/testcase/rtGetExecutionTest.php Mon May 11 11:03:26 2009 @@ -52,6 +52,4 @@ } } - ?> -?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/rtGzipPostExecutionTest.php?r1=1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/rtGzipPostExecutionTest.php diff -u phpruntests/tests/testcase/rtGzipPostExecutionTest.php:1.1 phpruntests/tests/testcase/rtGzipPostExecutionTest.php:1.2 --- phpruntests/tests/testcase/rtGzipPostExecutionTest.php:1.1 Thu Apr 30 19:07:43 2009 +++ phpruntests/tests/testcase/rtGzipPostExecutionTest.php Mon May 11 11:03:26 2009 @@ -50,6 +50,4 @@ } } - ?> -?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/rtPhpRunnerTest.php?r1=1.3&r2=1.4&diff_format=u Index: phpruntests/tests/testcase/rtPhpRunnerTest.php diff -u phpruntests/tests/testcase/rtPhpRunnerTest.php:1.3 phpruntests/tests/testcase/rtPhpRunnerTest.php:1.4 --- phpruntests/tests/testcase/rtPhpRunnerTest.php:1.3 Fri Apr 24 09:42:01 2009 +++ phpruntests/tests/testcase/rtPhpRunnerTest.php Mon May 11 11:03:26 2009 @@ -38,5 +38,4 @@ $this->assertEquals("hello", $PhpRunner->runphp()); } } - ?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/rtPostExecutionTest.php?r1=1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/rtPostExecutionTest.php diff -u phpruntests/tests/testcase/rtPostExecutionTest.php:1.1 phpruntests/tests/testcase/rtPostExecutionTest.php:1.2 --- phpruntests/tests/testcase/rtPostExecutionTest.php:1.1 Tue Apr 28 20:58:29 2009 +++ phpruntests/tests/testcase/rtPostExecutionTest.php Mon May 11 11:03:26 2009 @@ -50,6 +50,4 @@ } } - ?> -?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/phpruntests/tests/testcase/rtPostRawExecutionTest.php?r1=1.1&r2=1.2&diff_format=u Index: phpruntests/tests/testcase/rtPostRawExecutionTest.php diff -u phpruntests/tests/testcase/rtPostRawExecutionTest.php:1.1 phpruntests/tests/testcase/rtPostRawExecutionTest.php:1.2 --- phpruntests/tests/testcase/rtPostRawExecutionTest.php:1.1 Mon May 4 16:27:40 2009 +++ phpruntests/tests/testcase/rtPostRawExecutionTest.php Mon May 11 11:03:26 2009 @@ -50,6 +50,4 @@ } } - ?> -?> \ No newline at end of
Re: [PHP-CVS] cvs: phpruntests / Doxyfile build.xml doxygen.conf
Hi Pierre, Pierre Joye wrote: > Similar area, you know phpdocumentor right? Have you heard of Unix? It's often said that it's a better operating system than Windows, and the majority of PHP developers use it. You should thus consider switching to Unix. Seriously: what's the point of your email? I know PHPDocumentor, and I like Doxygen better, period. Anybody else can use PHPDocumentor if they want. Do you also want to complain about the IDE I'm using? Regards, Stefan -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: phpruntests / Doxyfile build.xml doxygen.conf
spriebsch Sun Apr 26 14:54:46 2009 UTC Added files: /phpruntestsDoxyfile Removed files: /phpruntestsdoxygen.conf Modified files: /phpruntestsbuild.xml Log: Simplified doxygen call by using default config file name. http://cvs.php.net/viewvc.cgi/phpruntests/build.xml?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/build.xml diff -u phpruntests/build.xml:1.2 phpruntests/build.xml:1.3 --- phpruntests/build.xml:1.2 Fri Apr 24 09:42:19 2009 +++ phpruntests/build.xml Sun Apr 26 14:54:46 2009 @@ -4,9 +4,9 @@ - + - + -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: phpruntests /documentation introduction.txt
spriebsch Sun Apr 26 14:41:02 2009 UTC Added files: /phpruntests/documentation introduction.txt Log: Started introductory documentation. http://cvs.php.net/viewvc.cgi/phpruntests/documentation/introduction.txt?view=markup&rev=1.1 Index: phpruntests/documentation/introduction.txt +++ phpruntests/documentation/introduction.txt Introduction to run-tests - runtests is a test environment written in PHP. It is used to tests PHP itself. It is not a replacement for unit test frameworks like PHPUnit. The basic principle of automated tests is very simple. Compare a computed result with some pre-calculated "known good", expected value. If both match, the test has passed. If they do not match, the tests failes, and there is probably a bug in PHP, or some precondition for the test was not met. Testing PHP is a far more complex issue than it may seem at first glance, because each test may require an individual PHP configuration, certain settings at operting system level (for example environment variables), or even external services (like databases, LDAP servers or IMAP servers). A test that requires external services can be complex to set up, but there is no way around that. How could you make sure that running a SQL statement against a database works without actually running it against a database? Since a failing test will probably leave its environment in an unpredictable state, a high level of test isolation is required. In other words, this means that we need to set up a new preconfigured PHP process for each test. This is the only way to ensure that every test runs in a clean environment. So, to execute each test, runtests must set up a PHP process, have it run the test, collect the output, and compare it to the pre-calculated "known good" expected output. That spawned PHP process (hopefully) terminates, so at the process level, we do not have to worry about the potential mess that a test has left behind. Still, if the test has created files, databases, or modified the global system environment, additional work may be required to clean up after the test. Since PHP runs on most of the available platforms, runtests must also run on all these platforms. From an implementation point of view, this means that runtests must work on a minimal, stock PHP installation, and should make as few as possible assumptions on the system environment. All the more or less known cross-platform issues like different line endings, directory separators, case handling, as well as limits of different operating system families (file name path length, include path length) have to be taken into account and being dealt with in runtests. Since runtests spawns off a separate PHP process to run a test, it is not necessary to run each test in the same PHP version that runtests runs on. In other words, that means that you can test a different PHP version than you are actually running - and in fact, it may be a good idea to use a "known good" PHP version to test a new, less tested PHP version. After all, bugs in the PHP version runtests itself is running on might affect runtests itself, and thus make the test results less reliable. We have already mentioned that tests need an individual environment. Not all tests can be run at the command line, for example. If a test need to make sure that PHP returns correct HTTP header, or processes GET or POST input, the test probably requires the CGI SAPI to run. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: phpruntests /tests/configuration/preconditions rtIfParallelHasPcntlTest.php
spriebsch Sat Apr 25 15:39:09 2009 UTC Modified files: /phpruntests/tests/configuration/preconditions rtIfParallelHasPcntlTest.php Log: Refactored test and added comments. http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php?r1=1.3&r2=1.4&diff_format=u Index: phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php diff -u phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php:1.3 phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php:1.4 --- phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php:1.3 Sat Apr 25 15:13:24 2009 +++ phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php Sat Apr 25 15:39:09 2009 @@ -1,49 +1,83 @@ + * @author Stefan Priebsch + * @copyright 2009 The PHP Group + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @link http://qa.php.net/ + */ require_once 'PHPUnit/Framework.php'; require_once dirname(__FILE__) . '../../../../src/rtAutoload.php'; +/** + * Tests for rtIfParallelHasPcntlTest precondition. + * + * @category Testing + * @package RUNTESTS + * @authorZoe Slattery + * @authorStefan Priebsch + * @copyright 2009 The PHP Group + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @link http://qa.php.net/ + */ class rtIfParallelHasPcntlTest extends PHPUnit_Framework_TestCase { -public function testLoaded() +protected function setUp() { -$clo = new rtCommandLineOptions(); -$clo->parse(array('run-tests.php', '-z')); -$env = rtEnvironmentVariables::getInstance(); - -$pre = new rtIfParallelHasPcntl(); +$this->preCondition = new rtIfParallelHasPcntl(); +$this->commandLine = new rtCommandLineOptions(); -$this->assertEquals(extension_loaded('pcntl'), $pre->check($clo, $env)); +$this->environment = rtEnvironmentVariables::getInstance(); } - -public function testLoaded2() + +protected function tearDown() { -$clo = new rtCommandLineOptions(); -$env = rtEnvironmentVariables::getInstance(); -$env->setVariable('TEST_PHP_PARALLEL', true); - -$pre = new rtIfParallelHasPcntl(); +unset($this->preCondition); +unset($this->commandLine); +unset($this->environment); +} -$this->assertTrue($pre->check($clo, $env)); +/** + * Ensure that check (wether pcntl is loaded) works + * when parallel test execution is requested by command line option. + */ +public function testCheckWhenCommandLineOptionIsSet() +{ +$this->commandLine->parse(array('run-tests.php', '-z')); + +$this->assertEquals(extension_loaded('pcntl'), $this->preCondition->check($this->commandLine, $this->environment)); } - -public function testNotRequired() + +/** + * Ensure that check (wether pcntl is loaded) works + * when parallel test execution is requested by environment variable. + */ +public function testCheckWhenEnvironmentVariableIsSet() { -$clo = new rtCommandLineOptions(); -$env = rtEnvironmentVariables::getInstance(); +$this->environment->setVariable('TEST_PHP_PARALLEL', true); -$pre = new rtIfParallelHasPcntl(); +$this->assertTrue($this->preCondition->check($this->commandLine, $this->environment)); +} -$this->assertTrue($pre->check($clo, $env)); +/** + * Ensure that check returns true when no parallel test execution is requested. + */ +public function testCheckWhenParallelExecutionIsNotRequired() +{ +$this->assertTrue($this->preCondition->check($this->commandLine, $this->environment)); } +/** + * Ensure that the error message is correct. + */ public function testgetMessage() { -$pre = new rtIfParallelHasPcntl(); - -$this->assertEquals($pre->getMessage('pcntlNotLoaded'), rtText::get('pcntlNotLoaded')); +$this->assertEquals($this->preCondition->getMessage('pcntlNotLoaded'), rtText::get('pcntlNotLoaded')); } - -//Not sure how to check if it's not loaded? } ?> -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: phpruntests /src/configuration/preconditions rtIfParallelHasPcntl.php
spriebsch Sat Apr 25 15:13:53 2009 UTC Modified files: /phpruntests/src/configuration/preconditions rtIfParallelHasPcntl.php Log: Simplified method. http://cvs.php.net/viewvc.cgi/phpruntests/src/configuration/preconditions/rtIfParallelHasPcntl.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/src/configuration/preconditions/rtIfParallelHasPcntl.php diff -u phpruntests/src/configuration/preconditions/rtIfParallelHasPcntl.php:1.2 phpruntests/src/configuration/preconditions/rtIfParallelHasPcntl.php:1.3 --- phpruntests/src/configuration/preconditions/rtIfParallelHasPcntl.php:1.2 Mon Apr 20 20:24:30 2009 +++ phpruntests/src/configuration/preconditions/rtIfParallelHasPcntl.php Sat Apr 25 15:13:53 2009 @@ -24,9 +24,7 @@ public function check(rtCommandLineOptions $commandLine = null, rtEnvironmentVariables $environmentVariables = null) { if ($commandLine->hasOption('z') || $environmentVariables->hasVariable('TESTS_PHP_PARALLEL')) { -if (!extension_loaded('pcntl')) { -return false; -} +return extension_loaded('pcntl'); } return true; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: phpruntests /tests/configuration/preconditions rtIfParallelHasPcntlTest.php
spriebsch Sat Apr 25 15:13:24 2009 UTC Modified files: /phpruntests/tests/configuration/preconditions rtIfParallelHasPcntlTest.php Log: Fixed test to work then no pcntl extension is loaded. http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php diff -u phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php:1.2 phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php:1.3 --- phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php:1.2 Mon Apr 20 20:50:39 2009 +++ phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php Sat Apr 25 15:13:24 2009 @@ -13,7 +13,7 @@ $pre = new rtIfParallelHasPcntl(); -$this->assertTrue($pre->check($clo, $env)); +$this->assertEquals(extension_loaded('pcntl'), $pre->check($clo, $env)); } public function testLoaded2() -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: phpruntests /src rtText.php
spriebsch Sat Apr 25 14:26:43 2009 UTC Modified files: /phpruntests/srcrtText.php Log: Added missing Docblock and added tags to conform with PEAR CS. http://cvs.php.net/viewvc.cgi/phpruntests/src/rtText.php?r1=1.4&r2=1.5&diff_format=u Index: phpruntests/src/rtText.php diff -u phpruntests/src/rtText.php:1.4 phpruntests/src/rtText.php:1.5 --- phpruntests/src/rtText.php:1.4 Fri Apr 24 08:52:21 2009 +++ phpruntests/src/rtText.php Sat Apr 25 14:26:43 2009 @@ -1,6 +1,29 @@ + * @author Stefan Priebsch + * @copyright 2009 The PHP Group + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @link http://qa.php.net/ + */ + +/** + * Reads texts stored in texts/ subdirectory + * + * rtText reads named texts from texts/ subdirectory + * optionally replacing %n placeholders. + * + * @category Testing + * @package RUNTESTS + * @authorZoe Slattery + * @author Stefan Priebsch + * @copyright 2009 The PHP Group + * @license http://www.php.net/license/3_01.txt PHP License 3.01 + * @link http://qa.php.net/ */ class rtText { @@ -10,9 +33,10 @@ * * @param string $name Text name to return * @param array $replacements Placeholder replacements + * * @return string */ -public static function get($name, array $replacements = array()) +public static function get($name, $replacements = array()) { $filename = dirname(__FILE__) . '/texts/' . $name . '.txt'; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: phpruntests / build.xml
spriebsch Fri Apr 24 09:42:19 2009 UTC Modified files: /phpruntestsbuild.xml Log: Added lint check for tests. http://cvs.php.net/viewvc.cgi/phpruntests/build.xml?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/build.xml diff -u phpruntests/build.xml:1.1.1.1 phpruntests/build.xml:1.2 --- phpruntests/build.xml:1.1.1.1 Wed Apr 15 16:30:16 2009 +++ phpruntests/build.xml Fri Apr 24 09:42:19 2009 @@ -16,6 +16,13 @@ + + + + + + + -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: phpruntests /tests rtTextTest.php /tests/configuration rtDirectoryListTest.php rtEnvironmentVariablesTest.php rtPreconditionListTest.php rtRuntestsConfigurationTest.php /tests/configu
spriebsch Fri Apr 24 09:42:02 2009 UTC Modified files: /phpruntests/tests rtTextTest.php /phpruntests/tests/configurationrtDirectoryListTest.php rtEnvironmentVariablesTest.php rtPreconditionListTest.php rtRuntestsConfigurationTest.php /phpruntests/tests/configuration/preconditions rtIsExecutableSetTest.php rtIsTestFileSpecifiedTest.php /phpruntests/tests/configuration/settings rtPhpExecutableSettingTest.php rtTestFileSettingTest.php /phpruntests/tests/testcase rtCleanExecutionTest.php rtPhpRunnerTest.php rtPhpTestFileTest.php rtTestConfigurationTest.php rtTestDifferenceTest.php rtTestExecutionTest.php rtTestOutputWriterTest.php rtTestResultsTest.php /phpruntests/tests/testcase/preconditions rtHasMandatorySectionsTest.php rtHasNoDuplicateSectionTest.php rtIsSectionImplementedTest.php rtIsValidSectionNameTest.php /phpruntests/tests/testcase/sectionsrtSectionTest.php /phpruntests/tests/testcase/sections/configurationsections rtArgsSectionTest.php rtEnvSectionTest.php rtIniSectionTest.php /phpruntests/tests/testcase/sections/executablesections rtCleanSectionTest.php rtFileSectionTest.php rtSkipIfSectionTest.php /phpruntests/tests/testcase/sections/informationsections rtCreditsSectionTest.php rtTestHeaderSectionTest.php rtXfailSectionTest.php /phpruntests/tests/testcase/sections/outputsections rtExpectFSectionTest.php rtExpectRegexSectionTest.php rtExpectSectionTest.php Log: Reformatted to conform to PEAR coding standard. http://cvs.php.net/viewvc.cgi/phpruntests/tests/rtTextTest.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/tests/rtTextTest.php diff -u phpruntests/tests/rtTextTest.php:1.1.1.1 phpruntests/tests/rtTextTest.php:1.2 --- phpruntests/tests/rtTextTest.php:1.1.1.1Wed Apr 15 16:30:20 2009 +++ phpruntests/tests/rtTextTest.phpFri Apr 24 09:42:01 2009 @@ -1,13 +1,14 @@ assertEquals(substr($words, 0, 9), 'Synopsis:'); - } +public function testOutput() +{ +$words = rtText::get('help'); +$this->assertEquals(substr($words, 0, 9), 'Synopsis:'); +} } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/rtDirectoryListTest.php?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/tests/configuration/rtDirectoryListTest.php diff -u phpruntests/tests/configuration/rtDirectoryListTest.php:1.2 phpruntests/tests/configuration/rtDirectoryListTest.php:1.3 --- phpruntests/tests/configuration/rtDirectoryListTest.php:1.2 Mon Apr 20 20:50:39 2009 +++ phpruntests/tests/configuration/rtDirectoryListTest.php Fri Apr 24 09:42:01 2009 @@ -8,24 +8,24 @@ public function setUp() { $tmpDir = sys_get_temp_dir(). "/top"; -mkdir ($tmpDir); -mkdir ($tmpDir. "/a"); -mkdir ($tmpDir. "/b"); -mkdir ($tmpDir. "/c"); +mkdir($tmpDir); +mkdir($tmpDir. "/a"); +mkdir($tmpDir. "/b"); +mkdir($tmpDir. "/c"); file_put_contents($tmpDir. "/c/afile", "hello"); -mkdir ($tmpDir. "/c/d"); +mkdir($tmpDir. "/c/d"); } public function tearDown() { $tmpDir = sys_get_temp_dir(). "/top"; -rmdir ($tmpDir. "/a"); -rmdir ($tmpDir. "/b"); +rmdir($tmpDir. "/a"); +rmdir($tmpDir. "/b"); -unlink ($tmpDir. "/c/afile"); -rmdir ($tmpDir. "/c/d"); -
[PHP-CVS] cvs: phpruntests /src rtText.php /src/testgroup rtPhpTestGroup.php /src/testrun rtPhpTestRun.php /src/texts invalidTestFileName.txt
spriebsch Fri Apr 24 08:52:22 2009 UTC Modified files: /phpruntests/srcrtText.php /phpruntests/src/testgroup rtPhpTestGroup.php /phpruntests/src/testrunrtPhpTestRun.php /phpruntests/src/texts invalidTestFileName.txt Log: Added optional placeholder replacement to rtText. Modified invalidTestFileName error message to include filename as placeholder. http://cvs.php.net/viewvc.cgi/phpruntests/src/rtText.php?r1=1.3&r2=1.4&diff_format=u Index: phpruntests/src/rtText.php diff -u phpruntests/src/rtText.php:1.3 phpruntests/src/rtText.php:1.4 --- phpruntests/src/rtText.php:1.3 Fri Apr 24 08:41:25 2009 +++ phpruntests/src/rtText.php Fri Apr 24 08:52:21 2009 @@ -1,17 +1,18 @@ http://cvs.php.net/viewvc.cgi/phpruntests/src/testgroup/rtPhpTestGroup.php?r1=1.3&r2=1.4&diff_format=u Index: phpruntests/src/testgroup/rtPhpTestGroup.php diff -u phpruntests/src/testgroup/rtPhpTestGroup.php:1.3 phpruntests/src/testgroup/rtPhpTestGroup.php:1.4 --- phpruntests/src/testgroup/rtPhpTestGroup.php:1.3Fri Apr 24 08:41:26 2009 +++ phpruntests/src/testgroup/rtPhpTestGroup.phpFri Apr 24 08:52:21 2009 @@ -22,8 +22,7 @@ foreach ($this->testFiles as $testName) { if (!file_exists($testName)) { -echo $testName . " "; -echo rtText::get('invalidTestFileName'); +echo rtText::get('invalidTestFileName', array($testName)); exit(); } http://cvs.php.net/viewvc.cgi/phpruntests/src/testrun/rtPhpTestRun.php?r1=1.3&r2=1.4&diff_format=u Index: phpruntests/src/testrun/rtPhpTestRun.php diff -u phpruntests/src/testrun/rtPhpTestRun.php:1.3 phpruntests/src/testrun/rtPhpTestRun.php:1.4 --- phpruntests/src/testrun/rtPhpTestRun.php:1.3Fri Apr 24 08:41:26 2009 +++ phpruntests/src/testrun/rtPhpTestRun.phpFri Apr 24 08:52:21 2009 @@ -1,4 +1,4 @@ -igetSetting('TestFiles') as $testName) { if (!file_exists($testName)) { -echo $testName . " "; -echo rtText::get('invalidTestFileName'); +echo rtText::get('invalidTestFileName', array($testName)); exit(); } http://cvs.php.net/viewvc.cgi/phpruntests/src/texts/invalidTestFileName.txt?r1=1.2&r2=1.3&diff_format=u Index: phpruntests/src/texts/invalidTestFileName.txt diff -u phpruntests/src/texts/invalidTestFileName.txt:1.2 phpruntests/src/texts/invalidTestFileName.txt:1.3 --- phpruntests/src/texts/invalidTestFileName.txt:1.2 Fri Apr 24 08:40:54 2009 +++ phpruntests/src/texts/invalidTestFileName.txt Fri Apr 24 08:52:22 2009 @@ -1 +1 @@ -The test file supplied is not a valid phpt test file. +The test file %1 is not a valid phpt test file. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: phpruntests /src/texts invalidTestFile.txt invalidTestFileName.txt invalidTestList.txt missingTestFile.txt nonExistantTestDirectory.txt pcntlNotLoaded.txt sectionNotImplemented.txt
spriebsch Fri Apr 24 08:40:54 2009 UTC Modified files: /phpruntests/src/texts invalidTestFile.txt invalidTestFileName.txt invalidTestList.txt missingTestFile.txt nonExistantTestDirectory.txt pcntlNotLoaded.txt sectionNotImplemented.txt Log: Fixed typos and interpunctation. http://cvs.php.net/viewvc.cgi/phpruntests/src/texts/invalidTestFile.txt?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/src/texts/invalidTestFile.txt diff -u phpruntests/src/texts/invalidTestFile.txt:1.1.1.1 phpruntests/src/texts/invalidTestFile.txt:1.2 --- phpruntests/src/texts/invalidTestFile.txt:1.1.1.1 Wed Apr 15 16:30:18 2009 +++ phpruntests/src/texts/invalidTestFile.txt Fri Apr 24 08:40:54 2009 @@ -1,3 +1,2 @@ -The name of the test file that you have supplied in not valid or cannot -be found. -Test files need to end with the .phpt qualifier. \ No newline at end of file +The name of the test file that you have supplied is not valid or cannot +be found. Test files need to end with the .phpt qualifier. http://cvs.php.net/viewvc.cgi/phpruntests/src/texts/invalidTestFileName.txt?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/src/texts/invalidTestFileName.txt diff -u phpruntests/src/texts/invalidTestFileName.txt:1.1.1.1 phpruntests/src/texts/invalidTestFileName.txt:1.2 --- phpruntests/src/texts/invalidTestFileName.txt:1.1.1.1 Wed Apr 15 16:30:18 2009 +++ phpruntests/src/texts/invalidTestFileName.txt Fri Apr 24 08:40:54 2009 @@ -1 +1 @@ -The test file supplied is not a valid phpt test file +The test file supplied is not a valid phpt test file. http://cvs.php.net/viewvc.cgi/phpruntests/src/texts/invalidTestList.txt?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/src/texts/invalidTestList.txt diff -u phpruntests/src/texts/invalidTestList.txt:1.1.1.1 phpruntests/src/texts/invalidTestList.txt:1.2 --- phpruntests/src/texts/invalidTestList.txt:1.1.1.1 Wed Apr 15 16:30:18 2009 +++ phpruntests/src/texts/invalidTestList.txt Fri Apr 24 08:40:54 2009 @@ -1,3 +1,3 @@ -The list of files supplied by the -r or -l command line opton is not valid. +The list of files supplied by the -r or -l command line option is not valid. This may be because the list is not readable (-r), not readable and/or not -writeable (-l), of the list contains tests that do not have the qualifier .phpt \ No newline at end of file +writeable (-l), or the list contains tests that do not have the qualifier .phpt. http://cvs.php.net/viewvc.cgi/phpruntests/src/texts/missingTestFile.txt?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/src/texts/missingTestFile.txt diff -u phpruntests/src/texts/missingTestFile.txt:1.1.1.1 phpruntests/src/texts/missingTestFile.txt:1.2 --- phpruntests/src/texts/missingTestFile.txt:1.1.1.1 Wed Apr 15 16:30:18 2009 +++ phpruntests/src/texts/missingTestFile.txt Fri Apr 24 08:40:54 2009 @@ -1,5 +1,4 @@ -You must specify the name of the test that you want to run. This may -suplied at the command line as a file, a directory containing tests or - a list of tests in a file (-l or -r options). -A directory name containing tests may also be given using the -environmental variable TEST_PHP_USER. \ No newline at end of file +You must specify the name of the test that you want to run. +This may be suplied at the command line as a file, a directory containing tests +or a list of tests in a file (-l or -r options). A directory name containing +tests may also be given using the environmental variable TEST_PHP_USER. http://cvs.php.net/viewvc.cgi/phpruntests/src/texts/nonExistantTestDirectory.txt?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/src/texts/nonExistantTestDirectory.txt diff -u phpruntests/src/texts/nonExistantTestDirectory.txt:1.1.1.1 phpruntests/src/texts/nonExistantTestDirectory.txt:1.2 --- phpruntests/src/texts/nonExistantTestDirectory.txt:1.1.1.1 Wed Apr 15 16:30:18 2009 +++ phpruntests/src/texts/nonExistantTestDirectory.txt Fri Apr 24 08:40:54 2009 @@ -1,2 +1,2 @@ The test directory name that you supplied as part of the command line or -in the environmental variable 'TEST_PHP_USER' is not a directory \ No newline at end of file +in the environmental variable 'TEST_PHP_USER' is not a directory. http://cvs.php.net/viewvc.cgi/phpruntests/src/texts/pcntlNotLoaded.txt?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/src/texts/pcntlNotLoaded.txt diff -u phpruntests/src/texts/pcntlNotLoaded.txt:1.1.1.1 phpruntests/src/texts/pcntlNotLoaded.txt:1.2 --- phpruntests/src/texts/pcntlNotLoaded.txt:1.1.1.1Wed Apr 15 16:30:18 2009 +++ phpruntests/src/texts/pcntlNotLoaded.txtFri Apr 24 08:40:54 2009 @@ -1,2 +1,2 @@ You have asked to run tests in parallel, this requires that -PHP has PCNTL loaded. \ No newline at end of file +PHP has the PCNTL extension loaded. http://cvs.php.net/viewvc.cgi/phpruntests/src/texts/sectionNotImplemented.txt?r1=1.1.1.1&r2=1.2&dif
[PHP-CVS] cvs: phpruntests /src rtAutoload.php rtDirectoryList.php rtPhptFilterIterator.php rtText.php rtUtil.php
spriebsch Mon Apr 20 16:57:32 2009 UTC Modified files: /phpruntests/srcrtAutoload.php rtDirectoryList.php rtPhptFilterIterator.php rtText.php rtUtil.php Log: Reformatted to conform to PEAR coding standard. http://cvs.php.net/viewvc.cgi/phpruntests/src/rtAutoload.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/src/rtAutoload.php diff -u phpruntests/src/rtAutoload.php:1.1.1.1 phpruntests/src/rtAutoload.php:1.2 --- phpruntests/src/rtAutoload.php:1.1.1.1 Wed Apr 15 16:30:18 2009 +++ phpruntests/src/rtAutoload.php Mon Apr 20 16:57:31 2009 @@ -8,55 +8,52 @@ */ class rtAutoload { - /** - * @var array - */ - protected static $classMap; - - /** - * @var string - */ - protected static $classPath; - - - /** - * Initialize the autoloader - * - * @return null - */ - public static function init() - { -self::$classPath = dirname(__FILE__); +/** + * @var array + */ +protected static $classMap; + +/** + * @var string + */ +protected static $classPath; + +/** + * Initialize the autoloader + * + * @return null + */ +public static function init() +{ +self::$classPath = dirname(__FILE__); + +if (substr(self::$classPath, -1) != '/') { +self::$classPath .= '/'; +} + +if (file_exists(self::$classPath . 'rtClassMap.php')) { +include self::$classPath . 'rtClassMap.php'; +self::$classMap = $rtClassMap; +} + +if (function_exists('__autoload')) { +spl_autoload_register('__autoload'); +} -if (substr(self::$classPath, -1) != '/') { - self::$classPath .= '/'; +spl_autoload_register(array('rtAutoload', 'autoload')); } -if (file_exists(self::$classPath . 'rtClassMap.php')) { - include self::$classPath . 'rtClassMap.php'; - self::$classMap = $rtClassMap; +/** + * Autoload method + * + * @param string $class Class name to autoload + * @return null + */ +public static function autoload($class) +{ +if (isset(self::$classMap[$class])) { +include self::$classPath . self::$classMap[$class]; +} } - -if (function_exists('__autoload')) { - spl_autoload_register('__autoload'); -} - -spl_autoload_register(array('rtAutoload', 'autoload')); - } - - - /** - * Autoload method - * - * @param string $class Class name to autoload - * @return null - */ - public static function autoload($class) - { -if (isset(self::$classMap[$class])) { - include self::$classPath . self::$classMap[$class]; -} - } } - ?> http://cvs.php.net/viewvc.cgi/phpruntests/src/rtDirectoryList.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/src/rtDirectoryList.php diff -u phpruntests/src/rtDirectoryList.php:1.1.1.1 phpruntests/src/rtDirectoryList.php:1.2 --- phpruntests/src/rtDirectoryList.php:1.1.1.1 Wed Apr 15 16:30:18 2009 +++ phpruntests/src/rtDirectoryList.php Mon Apr 20 16:57:31 2009 @@ -1,29 +1,27 @@ getPathName(); -} -return $result; + public function getSubDirectoryPaths($topDirectory) + { + $result = array($topDirectory); + + foreach (new RecursiveIteratorIterator(new ParentIterator(new RecursiveDirectoryIterator($topDirectory)), 1) as $dir) { + $result[] = $dir->getPathName(); + } + + return $result; } - - } -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/phpruntests/src/rtPhptFilterIterator.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/src/rtPhptFilterIterator.php diff -u phpruntests/src/rtPhptFilterIterator.php:1.1.1.1 phpruntests/src/rtPhptFilterIterator.php:1.2 --- phpruntests/src/rtPhptFilterIterator.php:1.1.1.1Wed Apr 15 16:30:18 2009 +++ phpruntests/src/rtPhptFilterIterator.phpMon Apr 20 16:57:31 2009 @@ -1,11 +1,13 @@ current(), -strlen('.phpt')) == '.phpt'); +return substr($this->current(), -strlen('.phpt')) == '.phpt'; } - } -?> \ No newline at end of file +} +?> http://cvs.php.net/viewvc.cgi/phpruntests/src/rtText.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/src/rtText.php diff -u phpruntests/src/rtText.php:1.1.1.1 phpruntests/src/rtText.php:1.2 --- phpruntests/src/rtText.php:1.1.1.1 Wed Apr 15 16:30:18 2009 +++ phpruntests/src/rtText.php Mon Apr 20 16:57:31 2009 @@ -1,17 +1,19 @@ http://cvs.php.net/viewvc.cgi/phpruntests/src/rtUtil.php?r1=1.1.1.1&r2=1.2&diff_format=u Index: phpruntests/src/rtUtil.php diff -u phpruntests/src/rtUtil.php:1.1.1.1 phpruntests/src/rtUtil.php:1.2 --- phpruntests/src/rtUtil.php:1.1.1.1 Wed Apr 15 16:30:18 2009 +++ phpruntests/src/rtUtil.php Mon Apr 20 16:57:31 2009 @@ -1,37 +1,38 @@ getPathname(); -} +$result = array(); -return $result; - } +foreach (new rtPhptFilterIterator(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($aDirectory)))