diff --git a/src/bindings/php/Tests/EndTest.php b/src/bindings/php/Tests/EndTest.php index 0b7ef4295934272390388e2252eca462f3ab1d82..53955ed4c799e139ebefda2231460d0e84c8a7cc 100644 --- a/src/bindings/php/Tests/EndTest.php +++ b/src/bindings/php/Tests/EndTest.php @@ -12,15 +12,15 @@ class EndPTest extends PHPUnit_Framework_TestCase public function testSuccess() { - $result = h_parse($this->parser, ["a"]); + $result = h_parse($this->parser, "a"); var_dump($result); - $this->assertEquals("a", $result); + $this->assertEquals(array("a"), $result); } public function testFailure() { $result = h_parse($this->parser, "aa"); var_dump($result); - $this->assertEquals(NULL, $result); + $this->assertEquals(array(), $result); } } ?> \ No newline at end of file diff --git a/src/bindings/php/Tests/NothingTest.php b/src/bindings/php/Tests/NothingTest.php new file mode 100644 index 0000000000000000000000000000000000000000..fa31b55a883b3ca244418989ae5a199e48f5d1f5 --- /dev/null +++ b/src/bindings/php/Tests/NothingTest.php @@ -0,0 +1,19 @@ +<?php +include_once 'hammer.php'; + +class NothingPTest extends PHPUnit_Framework_TestCase +{ + protected $parser; + + protected function setUp() + { + $this->parser = h_nothing_p(); + } + + public function testFailure() + { + $result = h_parse($this->parser, "a"); + $this->assertEquals(NULL, $result); + } +} +?> \ No newline at end of file