diff --git a/src/bindings/php/Tests/EndTest.php b/src/bindings/php/Tests/EndTest.php index 0b7ef42..53955ed 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 0000000..fa31b55 --- /dev/null +++ b/src/bindings/php/Tests/NothingTest.php @@ -0,0 +1,19 @@ +parser = h_nothing_p(); + } + + public function testFailure() + { + $result = h_parse($this->parser, "a"); + $this->assertEquals(NULL, $result); + } +} +?> \ No newline at end of file