From 0c9ab03fd793dd9eef621b9f9b07b06c01029486 Mon Sep 17 00:00:00 2001 From: "Meredith L. Patterson" Date: Sun, 1 Dec 2013 21:21:00 -0800 Subject: [PATCH] h_difference works --- src/bindings/php/Tests/DifferenceTest.php | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/bindings/php/Tests/DifferenceTest.php diff --git a/src/bindings/php/Tests/DifferenceTest.php b/src/bindings/php/Tests/DifferenceTest.php new file mode 100644 index 0000000..88c1903 --- /dev/null +++ b/src/bindings/php/Tests/DifferenceTest.php @@ -0,0 +1,25 @@ +parser = h_difference(h_token("ab"), ch("a")); + } + + public function testSuccess() + { + $result = h_parse($this->parser, "ab"); + $this->assertEquals("ab", $result); + } + + public function testFailure() + { + $result = h_parse($this->parser, "a"); + $this->assertEquals(NULL, $result); + } +} +?> \ No newline at end of file