com phpruntests: fix to allow double equals in ini setting: src/configuration/rtIniAsCommandLineArgs.php
tests/configuration/rtIniAsCommandLineArgsTest.php

From: Date: Sun, 14 Jun 2009 10:39:02 +0000
Subject: com phpruntests: fix to allow double equals in ini setting: src/configuration/rtIniAsCommandLineArgs.php
tests/configuration/rtIniAsCommandLineArgsTest.php
Groups: php.qa 
Request: Send a blank email to php-qa+get-66414@lists.php.net to get a copy of this message
Commit: eb2b7036065b0f28cfa61b774e960e9033ca95fd Author: Zoe Slattery <zoe@php.net> Sun, 14 Jun 2009 10:39:02 +0000 Parents: 3d4cfe05ae456707e8110f91272cb45bd877d3e9 Branches: master Link: http://git.php.net/?p=phpruntests.git;a=commitdiff;h=eb2b7036065b0f28cfa61b774e960e9033ca95fd Log: fix to allow double equals in ini setting Changed paths: M src/configuration/rtIniAsCommandLineArgs.php M tests/configuration/rtIniAsCommandLineArgsTest.php Diff: diff --git a/src/configuration/rtIniAsCommandLineArgs.php b/src/configuration/rtIniAsCommandLineArgs.php index 3ee33a3..3183257 100644 --- a/src/configuration/rtIniAsCommandLineArgs.php +++ b/src/configuration/rtIniAsCommandLineArgs.php @@ -90,9 +90,9 @@ class rtIniAsCommandLineArgs return false; } - //test for == + //test for ==, which is allowed if (strncmp($parts[1], '=', 1) === 0) { - return false; + return true; } //test for a=b=c diff --git a/tests/configuration/rtIniAsCommandLineArgsTest.php b/tests/configuration/rtIniAsCommandLineArgsTest.php index 4a37987..0bf987e 100644 --- a/tests/configuration/rtIniAsCommandLineArgsTest.php +++ b/tests/configuration/rtIniAsCommandLineArgsTest.php @@ -63,5 +63,15 @@ class rtIniAsCommandLineArgsTest extends PHPUnit_Framework_TestCase $iniSet->setBase(); $addStr = $iniSet->settingsToArguments(array('af=be=blah'), $iniSet->getBasePhpDArgs()); } + + public function testValidDoubleEquals() + { + $iniSet = new rtIniAsCommandLineArgs(); + $iniSet->setBase(); + $addStr = $iniSet->settingsToArguments(array('af=='), $iniSet->getBasePhpDArgs()); + $last3= addslashes(substr($addStr, -3)); + + $this->assertEquals('==\"', $last3); + } } ?>

« previous php.qa (#66414) next »