zoe                                      Thu, 10 May 2012 10:49:40 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=325635

Log:
Change the tests to use the TestBootstrap for PHP defs

Changed paths:
    U   php/phpruntests/trunk/tests/configuration/rtPreconditionListTest.php
    U   
php/phpruntests/trunk/tests/configuration/rtRuntestsConfigurationTest.php
    U   php/phpruntests/trunk/tests/testcase/rtCleanExecutionTest.php
    U   php/phpruntests/trunk/tests/testcase/rtCookieExecutionTest.php
    U   php/phpruntests/trunk/tests/testcase/rtDeflatePostExecutionTest.php
    U   php/phpruntests/trunk/tests/testcase/rtFileExternalExecutionTest.php
    U   php/phpruntests/trunk/tests/testcase/rtGetExecutionTest.php
    U   php/phpruntests/trunk/tests/testcase/rtGzipPostExecutionTest.php
    U   php/phpruntests/trunk/tests/testcase/rtPhpRunnerTest.php
    U   php/phpruntests/trunk/tests/testcase/rtPhpTestTest.php
    U   php/phpruntests/trunk/tests/testcase/rtPostExecutionTest.php
    U   php/phpruntests/trunk/tests/testcase/rtPostRawExecutionTest.php
    U   php/phpruntests/trunk/tests/testcase/rtSkipIfExecutionTest.php
    U   php/phpruntests/trunk/tests/testcase/rtTestConfigurationTest.php
    U   php/phpruntests/trunk/tests/testcase/rtTestExecutionTest.php
    U   php/phpruntests/trunk/tests/testcase/rtTestOutputWriterTest.php
    U   php/phpruntests/trunk/tests/testcase/rtTestResultsTest.php

Modified: php/phpruntests/trunk/tests/configuration/rtPreconditionListTest.php
===================================================================
--- php/phpruntests/trunk/tests/configuration/rtPreconditionListTest.php	2012-05-10 04:52:13 UTC (rev 325634)
+++ php/phpruntests/trunk/tests/configuration/rtPreconditionListTest.php	2012-05-10 10:49:40 UTC (rev 325635)
@@ -12,6 +12,7 @@
  */

 require_once dirname(__FILE__) . '../../../src/rtAutoload.php';
+require_once dirname(__FILE__) . '/../rtTestBootstrap.php';

 /**
  * Tests for rtPreCondtionListTest precondition.
@@ -38,10 +39,9 @@

     public function testCheck()
     {
-        $php = trim(shell_exec("which php"));

         $preConditionList = rtPreConditionList::getInstance();
-        $runtestsConfiguration = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $php, 'a-test.phpt'));
+        $runtestsConfiguration = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, 'a-test.phpt'));
         $runtestsConfiguration->configure();

         $this->assertTrue($preConditionList->check($runtestsConfiguration));

Modified: php/phpruntests/trunk/tests/configuration/rtRuntestsConfigurationTest.php
===================================================================
--- php/phpruntests/trunk/tests/configuration/rtRuntestsConfigurationTest.php	2012-05-10 04:52:13 UTC (rev 325634)
+++ php/phpruntests/trunk/tests/configuration/rtRuntestsConfigurationTest.php	2012-05-10 10:49:40 UTC (rev 325635)
@@ -1,33 +1,33 @@
 <?php

 require_once dirname(__FILE__) . '../../../src/rtAutoload.php';
+require_once dirname(__FILE__) . '/../rtTestBootstrap.php';

 class rtRuntestsConfigurationTest extends PHPUnit_Framework_TestCase
 {

     public function setUp() {
-        $this->php = trim(shell_exec("which php"));
     }

     public function testCreateUnix()
     {
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, 'test.phpt'));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, 'test.phpt'));
         $config->configure();

         $testFiles = $config->getSetting('TestFiles');

-        $this->assertEquals($this->php, $config->getSetting('PhpExecutable'));
+        $this->assertEquals(RT_PHP_PATH, $config->getSetting('PhpExecutable'));
         $this->assertEquals('test.phpt', $testFiles[0]);
     }

     public function testCreateWin()
     {
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, 'test.phpt'), 'Windows');
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, 'test.phpt'), 'Windows');
         $config->configure();

         $testFiles = $config->getSetting('TestFiles');

-        $this->assertEquals($this->php, $config->getSetting('PhpExecutable'));
+        $this->assertEquals(RT_PHP_PATH, $config->getSetting('PhpExecutable'));
         $this->assertEquals('test.phpt', $testFiles[0]);
     }
 }

Modified: php/phpruntests/trunk/tests/testcase/rtCleanExecutionTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtCleanExecutionTest.php	2012-05-10 04:52:13 UTC (rev 325634)
+++ php/phpruntests/trunk/tests/testcase/rtCleanExecutionTest.php	2012-05-10 10:49:40 UTC (rev 325635)
@@ -1,6 +1,7 @@
 <?php

 require_once dirname(__FILE__) . '../../../src/rtAutoload.php';
+require_once dirname(__FILE__) . '/../rtTestBootstrap.php';

 class rtCleanExecutionTest extends PHPUnit_Framework_TestCase
 {
@@ -10,8 +11,6 @@

     public function setUp()
     {
-        $this->php = trim(shell_exec("which php"));
-
         $this->path_to_tests = realpath(dirname(__FILE__) . '/../../phpt-tests');
         $this->sample_test = $this->path_to_tests . '/sample_clean.phpt';
         $this->sample_fail = $this->path_to_tests . '/sample_clean_fail.phpt';
@@ -27,7 +26,7 @@
     public function testFileRun()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_test));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_test));
         $config->configure();

         //Retrieve the array of test file names
@@ -55,7 +54,7 @@
     public function testFailedClean()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_fail));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_fail));
         $config->configure();

         //Retrieve the array of test file names

Modified: php/phpruntests/trunk/tests/testcase/rtCookieExecutionTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtCookieExecutionTest.php	2012-05-10 04:52:13 UTC (rev 325634)
+++ php/phpruntests/trunk/tests/testcase/rtCookieExecutionTest.php	2012-05-10 10:49:40 UTC (rev 325635)
@@ -1,6 +1,7 @@
 <?php

 require_once dirname(__FILE__) . '../../../src/rtAutoload.php';
+require_once dirname(__FILE__) . '/../rtTestBootstrap.php';

 class rtCookieExecutionTest extends PHPUnit_Framework_TestCase
 {
@@ -9,10 +10,7 @@
     private $sample_fail;

     public function setUp()
-    {
-        $this->php = trim(shell_exec("which php"));
-        $this->php_cgi = trim(shell_exec("which php-cgi"));
-
+    {
         $this->path_to_tests = realpath(dirname(__FILE__) . '/../../phpt-tests');
         $this->sample_test = $this->path_to_tests . '/sample_cookie.phpt';
     }
@@ -25,8 +23,8 @@
     public function testFileRun()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_test));
-        $config->setEnvironmentVariable('TEST_PHP_CGI_EXECUTABLE',$this->php_cgi);
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_test));
+        $config->setEnvironmentVariable('TEST_PHP_CGI_EXECUTABLE',RT_PHP_CGI_PATH);
         $config->configure();

         //Retrieve the array of test file names

Modified: php/phpruntests/trunk/tests/testcase/rtDeflatePostExecutionTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtDeflatePostExecutionTest.php	2012-05-10 04:52:13 UTC (rev 325634)
+++ php/phpruntests/trunk/tests/testcase/rtDeflatePostExecutionTest.php	2012-05-10 10:49:40 UTC (rev 325635)
@@ -1,6 +1,7 @@
 <?php

 require_once dirname(__FILE__) . '../../../src/rtAutoload.php';
+require_once dirname(__FILE__) . '/../rtTestBootstrap.php';

 class rtDeflatePostExecutionTest extends PHPUnit_Framework_TestCase
 {
@@ -8,9 +9,6 @@

     public function setUp()
     {
-        $this->php = trim(shell_exec("which php"));
-        $this->php_cgi = trim(shell_exec("which php-cgi"));
-
         $this->path_to_tests = realpath(dirname(__FILE__) . '/../../phpt-tests');
         $this->sample_test = $this->path_to_tests . '/sample_deflatepost.phpt';
     }
@@ -23,8 +21,8 @@
     public function testFileRun()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_test));
-        $config->setEnvironmentVariable('TEST_PHP_CGI_EXECUTABLE',$this->php_cgi);
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_test));
+        $config->setEnvironmentVariable('TEST_PHP_CGI_EXECUTABLE', RT_PHP_CGI_PATH);
         $config->configure();

         //Retrieve the array of test file names

Modified: php/phpruntests/trunk/tests/testcase/rtFileExternalExecutionTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtFileExternalExecutionTest.php	2012-05-10 04:52:13 UTC (rev 325634)
+++ php/phpruntests/trunk/tests/testcase/rtFileExternalExecutionTest.php	2012-05-10 10:49:40 UTC (rev 325635)
@@ -1,6 +1,7 @@
 <?php

 require_once dirname(__FILE__) . '../../../src/rtAutoload.php';
+require_once dirname(__FILE__) . '/../rtTestBootstrap.php';

 class rtFileExternalExecutionTest extends PHPUnit_Framework_TestCase
 {
@@ -10,8 +11,6 @@

     public function setUp()
     {
-        $this->php = trim(shell_exec("which php"));
-
         $this->path_to_tests = realpath(dirname(__FILE__) . '/../../phpt-tests');
         $this->sample_test = $this->path_to_tests . '/sample_fileexternal.phpt';
         $this->sample_fail1 = $this->path_to_tests . '/sample_fileexternal1.phpt';
@@ -26,7 +25,7 @@
     public function testFileRun()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_test));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_test));
         $config->configure();

         //Retrieve the array of test file names
@@ -52,7 +51,7 @@
     public function testFail1()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_fail1));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_fail1));
         $config->configure();

         //Retrieve the array of test file names
@@ -78,7 +77,7 @@
     public function testFail2()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_fail2));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_fail2));
         $config->configure();

         //Retrieve the array of test file names

Modified: php/phpruntests/trunk/tests/testcase/rtGetExecutionTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtGetExecutionTest.php	2012-05-10 04:52:13 UTC (rev 325634)
+++ php/phpruntests/trunk/tests/testcase/rtGetExecutionTest.php	2012-05-10 10:49:40 UTC (rev 325635)
@@ -1,6 +1,7 @@
 <?php

 require_once dirname(__FILE__) . '../../../src/rtAutoload.php';
+require_once dirname(__FILE__) . '/../rtTestBootstrap.php';

 class rtGetExecutionTest extends PHPUnit_Framework_TestCase
 {
@@ -10,8 +11,6 @@

     public function setUp()
     {
-        $this->php = trim(shell_exec("which php"));
-        $this->php_cgi = trim(shell_exec("which php-cgi"));

         $this->path_to_tests = realpath(dirname(__FILE__) . '/../../phpt-tests');
         $this->sample_test = $this->path_to_tests . '/sample_get.phpt';
@@ -25,8 +24,8 @@
     public function testFileRun()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_test));
-        $config->setEnvironmentVariable('TEST_PHP_CGI_EXECUTABLE',$this->php_cgi);
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_test));
+        $config->setEnvironmentVariable('TEST_PHP_CGI_EXECUTABLE', RT_PHP_CGI_PATH);
         $config->configure();

         //Retrieve the array of test file names
@@ -56,7 +55,7 @@
     public function testNoCGI()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_test));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_test));
         $config->setEnvironmentVariable('TEST_PHP_CGI_EXECUTABLE', null);
         $config->configure();


Modified: php/phpruntests/trunk/tests/testcase/rtGzipPostExecutionTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtGzipPostExecutionTest.php	2012-05-10 04:52:13 UTC (rev 325634)
+++ php/phpruntests/trunk/tests/testcase/rtGzipPostExecutionTest.php	2012-05-10 10:49:40 UTC (rev 325635)
@@ -1,6 +1,7 @@
 <?php

 require_once dirname(__FILE__) . '../../../src/rtAutoload.php';
+require_once dirname(__FILE__) . '/../rtTestBootstrap.php';

 class rtGzipPostExecutionTest extends PHPUnit_Framework_TestCase
 {
@@ -8,9 +9,6 @@

     public function setUp()
     {
-        $this->php = trim(shell_exec("which php"));
-        $this->php_cgi = trim(shell_exec("which php-cgi"));
-
         $this->path_to_tests = realpath(dirname(__FILE__) . '/../../phpt-tests');
         $this->sample_test = $this->path_to_tests . '/sample_gzippost.phpt';
     }
@@ -23,8 +21,8 @@
     public function testFileRun()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_test));
-        $config->setEnvironmentVariable('TEST_PHP_CGI_EXECUTABLE',$this->php_cgi);
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_test));
+        $config->setEnvironmentVariable('TEST_PHP_CGI_EXECUTABLE', RT_PHP_CGI_PATH);
         $config->configure();

         //Retrieve the array of test file names

Modified: php/phpruntests/trunk/tests/testcase/rtPhpRunnerTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtPhpRunnerTest.php	2012-05-10 04:52:13 UTC (rev 325634)
+++ php/phpruntests/trunk/tests/testcase/rtPhpRunnerTest.php	2012-05-10 10:49:40 UTC (rev 325635)
@@ -1,13 +1,12 @@
 <?php

 require_once dirname(__FILE__) . '../../../src/rtAutoload.php';
+require_once dirname(__FILE__) . '/../rtTestBootstrap.php';

 class rtPhpRunnerTest extends PHPUnit_Framework_TestCase
 {
     public function setUp()
     {
-        $this->php = trim(shell_exec("which php"));
-
         $fh = fopen('/tmp/test.php', 'w');
         fwrite($fh, '<?php echo "hello world"; ?>');
         fclose($fh);
@@ -25,14 +24,14 @@

     public function testSimple()
     {
-        $PhpRunner = new rtPhpRunner($this->php . ' -n /tmp/test.php 2>&1', array(), '/tmp');
+        $PhpRunner = new rtPhpRunner(RT_PHP_PATH . ' -n /tmp/test.php 2>&1', array(), '/tmp');

         $this->assertEquals("hello world", $PhpRunner->runphp());
     }

     public function testStdin()
     {
-        $PhpRunner = new rtPhpRunner($this->php .' -n /tmp/test2.php 2>&1', array(), '/tmp', 'hello');
+        $PhpRunner = new rtPhpRunner(RT_PHP_PATH .' -n /tmp/test2.php 2>&1', array(), '/tmp', 'hello');

         $this->assertEquals("hello", $PhpRunner->runphp());
     }

Modified: php/phpruntests/trunk/tests/testcase/rtPhpTestTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtPhpTestTest.php	2012-05-10 04:52:13 UTC (rev 325634)
+++ php/phpruntests/trunk/tests/testcase/rtPhpTestTest.php	2012-05-10 10:49:40 UTC (rev 325635)
@@ -1,12 +1,12 @@
 <?php

 require_once dirname(__FILE__) . '../../../src/rtAutoload.php';
+require_once dirname(__FILE__) . '/../rtTestBootstrap.php';

 class rtPhpTestTest extends PHPUnit_Framework_TestCase
 {
     public function setUp()
     {
-        $this->php = trim(shell_exec("which php"));
         $this->testCase = array (
                             '--TEST--',
                             'This is a test',
@@ -43,7 +43,7 @@

     public function testCreateInstance()
     {
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, 'test.phpt'));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, 'test.phpt'));
         $config->configure();

         $status = new rtTestStatus('nameOfTest');
@@ -54,7 +54,7 @@

     public function testSections()
     {
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, 'test.phpt'));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, 'test.phpt'));
         $config->configure();

         $status = new rtTestStatus('nameOfTest');
@@ -67,7 +67,7 @@

     public function testDone()
     {
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, 'test.phpt'));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, 'test.phpt'));
         $config->configure();

         $status = new rtTestStatus('nameOfTest');
@@ -83,7 +83,7 @@

     public function testEmptySection()
     {
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, 'test.phpt'));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, 'test.phpt'));
         $config->configure();

         $status = new rtTestStatus('nameOfTest');

Modified: php/phpruntests/trunk/tests/testcase/rtPostExecutionTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtPostExecutionTest.php	2012-05-10 04:52:13 UTC (rev 325634)
+++ php/phpruntests/trunk/tests/testcase/rtPostExecutionTest.php	2012-05-10 10:49:40 UTC (rev 325635)
@@ -1,6 +1,7 @@
 <?php

 require_once dirname(__FILE__) . '../../../src/rtAutoload.php';
+require_once dirname(__FILE__) . '/../rtTestBootstrap.php';

 class rtPostExecutionTest extends PHPUnit_Framework_TestCase
 {
@@ -8,8 +9,6 @@

     public function setUp()
     {
-        $this->php = trim(shell_exec("which php"));
-        $this->php_cgi = trim(shell_exec("which php-cgi"));

         $this->path_to_tests = realpath(dirname(__FILE__) . '/../../phpt-tests');
         $this->sample_test = $this->path_to_tests . '/sample_post.phpt';
@@ -23,8 +22,8 @@
     public function testFileRun()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_test));
-        $config->setEnvironmentVariable('TEST_PHP_CGI_EXECUTABLE',$this->php_cgi);
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_test));
+        $config->setEnvironmentVariable('TEST_PHP_CGI_EXECUTABLE', RT_PHP_CGI_PATH);
         $config->configure();

         //Retrieve the array of test file names

Modified: php/phpruntests/trunk/tests/testcase/rtPostRawExecutionTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtPostRawExecutionTest.php	2012-05-10 04:52:13 UTC (rev 325634)
+++ php/phpruntests/trunk/tests/testcase/rtPostRawExecutionTest.php	2012-05-10 10:49:40 UTC (rev 325635)
@@ -1,6 +1,7 @@
 <?php

 require_once dirname(__FILE__) . '../../../src/rtAutoload.php';
+require_once dirname(__FILE__) . '/../rtTestBootstrap.php';

 class rtPostRawExecutionTest extends PHPUnit_Framework_TestCase
 {
@@ -8,9 +9,7 @@

     public function setUp()
     {
-        $this->php = trim(shell_exec("which php"));
-        $this->php_cgi = trim(shell_exec("which php-cgi"));
-
+
         $this->path_to_tests = realpath(dirname(__FILE__) . '/../../phpt-tests');
         $this->sample_test = $this->path_to_tests . '/sample_postraw.phpt';
     }
@@ -23,8 +22,8 @@
     public function testFileRun()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_test));
-        $config->setEnvironmentVariable('TEST_PHP_CGI_EXECUTABLE',$this->php_cgi);
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_test));
+        $config->setEnvironmentVariable('TEST_PHP_CGI_EXECUTABLE', RT_PHP_CGI_PATH);
         $config->configure();

         //Retrieve the array of test file names

Modified: php/phpruntests/trunk/tests/testcase/rtSkipIfExecutionTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtSkipIfExecutionTest.php	2012-05-10 04:52:13 UTC (rev 325634)
+++ php/phpruntests/trunk/tests/testcase/rtSkipIfExecutionTest.php	2012-05-10 10:49:40 UTC (rev 325635)
@@ -1,6 +1,7 @@
 <?php

 require_once dirname(__FILE__) . '../../../src/rtAutoload.php';
+require_once dirname(__FILE__) . '/../rtTestBootstrap.php';

 class rtSkipIfExecutionTest extends PHPUnit_Framework_TestCase
 {
@@ -8,7 +9,6 @@

     public function setUp()
     {
-        $this->php = trim(shell_exec("which php"));
         $path_to_tests = realpath(dirname(__FILE__) . '/../../phpt-tests');
         $this->sample_test = $path_to_tests . '/sample_skipif.phpt';
     }
@@ -21,7 +21,7 @@
     public function testFileRun()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_test));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_test));
         $config->configure();

         //Retrieve the array of test file names

Modified: php/phpruntests/trunk/tests/testcase/rtTestConfigurationTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtTestConfigurationTest.php	2012-05-10 04:52:13 UTC (rev 325634)
+++ php/phpruntests/trunk/tests/testcase/rtTestConfigurationTest.php	2012-05-10 10:49:40 UTC (rev 325635)
@@ -1,6 +1,7 @@
 <?php

 require_once dirname(__FILE__) . '../../../src/rtAutoload.php';
+require_once dirname(__FILE__) . '/../rtTestBootstrap.php';

 class rtTestConfigurationTest extends PHPUnit_Framework_TestCase
 {
@@ -8,7 +9,6 @@

     public function setUp()
     {
-        $this->php = $this->php = trim(shell_exec("which php"));

         $this->sections['ARGS'] = rtArgsSection::getInstance('ARGS', array('-vvv -a value -1111 -2 -v'), 'testname');
         $this->sections['ENV'] = rtEnvSection::getInstance('ENV', array('env1 = ENV1', 'env2=ENV2'), 'testname');
@@ -19,7 +19,7 @@

     public function testCreateInstance()
     {
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, 'test.phpt'));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, 'test.phpt'));
         $config->configure();

         $testConfiguration = new rtTestConfiguration($config, $this->sections, array(),$this->sections['FILE']);
@@ -29,7 +29,7 @@

     public function testEnv()
     {
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, 'test.phpt'));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, 'test.phpt'));
         $config->configure();

         $testConfiguration = new rtTestConfiguration($config, $this->sections, array(), $this->sections['FILE']);
@@ -41,7 +41,7 @@

     public function testArgs()
     {
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, 'test.phpt'));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, 'test.phpt'));
         $config->configure();

         $testConfiguration = new rtTestConfiguration($config, $this->sections, array(),$this->sections['FILE']);
@@ -53,7 +53,7 @@

     public function testIni()
     {
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, 'test.phpt'));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, 'test.phpt'));
         $config->configure();

         $testConfiguration = new rtTestConfiguration($config, $this->sections, array(),$this->sections['FILE']);
@@ -65,18 +65,18 @@

     public function testPHPExecutable()
     {
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, 'test.phpt'));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, 'test.phpt'));
         $config->configure();

         $testConfiguration = new rtTestConfiguration($config, $this->sections, array(),$this->sections['FILE']);
         $phpExe = $testConfiguration->getPhpExecutable();

-        $this->assertEquals($this->php, $phpExe);
+        $this->assertEquals(RT_PHP_PATH, $phpExe);
     }

     public function testPHPCgiExecutable()
     {
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, 'test.phpt'));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, 'test.phpt'));
         $config->setEnvironmentVariable('TEST_PHP_CGI_EXECUTABLE', 'a-php-cgi-exe');
         $config->configure();


Modified: php/phpruntests/trunk/tests/testcase/rtTestExecutionTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtTestExecutionTest.php	2012-05-10 04:52:13 UTC (rev 325634)
+++ php/phpruntests/trunk/tests/testcase/rtTestExecutionTest.php	2012-05-10 10:49:40 UTC (rev 325635)
@@ -1,6 +1,7 @@
 <?php

 require_once dirname(__FILE__) . '../../../src/rtAutoload.php';
+require_once dirname(__FILE__) . '/../rtTestBootstrap.php';

 class rtTestExecutionTest extends PHPUnit_Framework_TestCase
 {
@@ -12,7 +13,6 @@

     public function setUp()
     {
-        $this->php = trim(shell_exec("which php"));
         $this->path_to_tests = realpath(dirname(__FILE__) . '/../../phpt-tests');
         $this->sample_test = $this->path_to_tests . '/sample_test.phpt';
         $this->sample_expectf = $this->path_to_tests . '/sample_expectf.phpt';
@@ -31,7 +31,7 @@
     public function testFileRun()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_test));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_test));
         $config->configure();

         //Retrieve the array of test file names
@@ -57,7 +57,7 @@
     public function testFileRunDone()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_done));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_done));
         $config->configure();

         //Retrieve the array of test file names
@@ -83,7 +83,7 @@
     public function testFileRunAndCompare()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_test));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_test));
         $config->configure();

         //Retrieve the array of test file names
@@ -112,7 +112,7 @@
     public function testExpectFFileRunAndCompare()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_expectf));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_expectf));
         $config->configure();

         //Retrieve the array of test file names
@@ -142,7 +142,7 @@
     public function testExpectRegexFileRunAndCompare()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_expectregex));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_expectregex));
         $config->configure();

         //Retrieve the array of test file names

Modified: php/phpruntests/trunk/tests/testcase/rtTestOutputWriterTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtTestOutputWriterTest.php	2012-05-10 04:52:13 UTC (rev 325634)
+++ php/phpruntests/trunk/tests/testcase/rtTestOutputWriterTest.php	2012-05-10 10:49:40 UTC (rev 325635)
@@ -6,7 +6,6 @@
 {
     public function setUp()
     {
-        $this->php = trim(shell_exec("which php"));
         $this->path_to_tests = realpath(dirname(__FILE__) . '/../../phpt-tests');
         $this->sample_test = $this->path_to_tests . '/sample_test.phpt';
         $this->sample_test_fail = $this->path_to_tests . '/sample_test_fail.phpt';
@@ -29,7 +28,7 @@
     public function testFailedTest()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_test_fail));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_test_fail));
         $config->configure();

         //Retrieve the array of test file names

Modified: php/phpruntests/trunk/tests/testcase/rtTestResultsTest.php
===================================================================
--- php/phpruntests/trunk/tests/testcase/rtTestResultsTest.php	2012-05-10 04:52:13 UTC (rev 325634)
+++ php/phpruntests/trunk/tests/testcase/rtTestResultsTest.php	2012-05-10 10:49:40 UTC (rev 325635)
@@ -1,12 +1,12 @@
 <?php

 require_once dirname(__FILE__) . '../../../src/rtAutoload.php';
+require_once dirname(__FILE__) . '/../rtTestBootstrap.php';

 class rtTestResultsTest extends PHPUnit_Framework_TestCase
 {
     public function setUp()
     {
-        $this->php = trim(shell_exec("which php"));
         $this->path_to_tests = realpath(dirname(__FILE__) . '/../../phpt-tests');
         $this->sample_test = $this->path_to_tests. '/sample_test.phpt';
         $this->sample_test_fail = $this->path_to_tests. '/sample_test_fail.phpt';
@@ -32,7 +32,7 @@
     public function testFileDelete()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_test));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_test));
         $config->configure();

         //Retrieve the array of test file names
@@ -62,7 +62,7 @@
     public function testFileSaveAll()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_test, '--keep-all'));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_test, '--keep-all'));
         $config->configure();

         //Retrieve the array of test file names
@@ -92,7 +92,7 @@
     public function testFileSavePHP()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_test, '--keep-php'));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_test, '--keep-php'));
         $config->configure();

         //Retrieve the array of test file names
@@ -122,7 +122,7 @@
     public function testFailedTest()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_test_fail));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_test_fail));
         $config->configure();

         //Retrieve the array of test file names
@@ -155,7 +155,7 @@
     public function testSkippedTest()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_skipif));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_skipif));
         $config->configure();

         //Retrieve the array of test file names
@@ -186,7 +186,7 @@
     public function testSkippedTestKeep()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_skipif, '--keep-all'));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_skipif, '--keep-all'));
         $config->configure();

         //Retrieve the array of test file names
@@ -216,7 +216,7 @@
     public function testCleanPass()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_clean));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_clean));
         $config->configure();

         //Retrieve the array of test file names
@@ -247,7 +247,7 @@
     public function testBork()
     {
         //Create a new test configuration
-        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', $this->php, $this->sample_bork));
+        $config = rtRuntestsConfiguration::getInstance(array('run-tests.php', '-p', RT_PHP_PATH, $this->sample_bork));
         $config->configure();

         //Retrieve the array of test file names
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to