com phpruntests: fixing {PWD} in INI sections: tests/testcase/sections/configurationsections/rtIniSectionTest.php

From: Date: Thu, 16 Jul 2009 16:02:44 +0000
Subject: com phpruntests: fixing {PWD} in INI sections: tests/testcase/sections/configurationsections/rtIniSectionTest.php
Groups: php.qa 
Request: Send a blank email to php-qa+get-66333@lists.php.net to get a copy of this message
Commit: c5b7985a911f972b29e9a8b032e96083f9e04166 Author: Zoe Slattery <zoe@php.net> Thu, 16 Jul 2009 16:02:44 +0000 Parents: 8325cd8c3e9fc2e8a627d69f0d4b26e310a8ac98 Branches: master Link: http://git.php.net/?p=phpruntests.git;a=commitdiff;h=c5b7985a911f972b29e9a8b032e96083f9e04166 Log: fixing {PWD} in INI sections Changed paths: M tests/testcase/sections/configurationsections/rtIniSectionTest.php Diff: diff --git a/tests/testcase/sections/configurationsections/rtIniSectionTest.php b/tests/testcase/sections/configurationsections/rtIniSectionTest.php index a5f8a14..a7cea42 100644 --- a/tests/testcase/sections/configurationsections/rtIniSectionTest.php +++ b/tests/testcase/sections/configurationsections/rtIniSectionTest.php @@ -7,11 +7,21 @@ class rtIniSectionTest extends PHPUnit_Framework_TestCase { public function testCreateInstance() { - $iniSection = rtIniSection::getInstance('INI', array('error_reporting=E_ALL | E_STRICT | E_DEPRECATED', 'assert.active = 1')); + $iniSection = rtIniSection::getInstance('INI', array('error_reporting=E_ALL | E_STRICT | E_DEPRECATED', 'assert.active = 1')); + $iniSection->substitutePWD('a-file-name'); $inilist = $iniSection->getCommandLineArguments(); $this->assertEquals('error_reporting=E_ALL | E_STRICT | E_DEPRECATED', $inilist[0]); $this->assertEquals('assert.active = 1', $inilist[1]); } + public function testSubtitutePWD() + { + $iniSection = rtIniSection::getInstance('INI', array('include_path={PWD}')); + $afile = __FILE__; + $iniSection->substitutePWD($afile); + $inilist = $iniSection->getCommandLineArguments(); + + $this->assertEquals('include_path=' . dirname($afile), $inilist[0]); + } } ?>

« previous php.qa (#66333) next »