X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=phpunit%2FHeaderTest.php;h=184f21a58065223e3617f9414e379e155d51beff;hb=34c8af32031e2e847b4919402373ad70fc28a863;hp=c04a7f739f8de487c9805bdde455761ea5902f3c;hpb=0327131cf87a5be32585fea1291178b60a359cbf;p=m6w6%2Fext-http diff --git a/phpunit/HeaderTest.php b/phpunit/HeaderTest.php index c04a7f7..184f21a 100644 --- a/phpunit/HeaderTest.php +++ b/phpunit/HeaderTest.php @@ -47,9 +47,9 @@ class HeaderTest extends PHPUnit_Framework_TestCase { function testParse() { $header = "Foo: bar\nBar: foo\n"; $this->assertEquals(array("Foo"=>"bar","Bar"=>"foo"), http\Header::parse($header)); - $header = http\Header::parse($header, "http\\Header"); - $this->assertCount(2, $header); - $this->assertContainsOnlyInstancesOf("http\\Header", $header); + $headers = http\Header::parse($header, "http\\Header"); + $this->assertCount(2, $headers); + $this->assertContainsOnlyInstancesOf("http\\Header", $headers); } function testParseError() { @@ -71,11 +71,11 @@ class HeaderTest extends PHPUnit_Framework_TestCase { } function testParamsWithArgs() { - $header = new http\Header("Custom", '"foo" is "bar". "bar" is "bis" where "bis" is 3.'); + $header = new http\Header("Custom", '"foo" is "bar". "bar" is "bis" where "bis" is "where".'); $this->assertEquals( array( "foo" => array("value" => "bar", "arguments" => array()), - "bar" => array("value" => "baz", "arguments" => array("baz" => "3")) + "bar" => array("value" => "bis", "arguments" => array("bis" => "where")) ), $header->getParams(".", "where", "is")->params );