diff --git a/src/bindings/php/Tests/InTest.php b/src/bindings/php/Tests/InTest.php new file mode 100644 index 0000000..5c2ed8c --- /dev/null +++ b/src/bindings/php/Tests/InTest.php @@ -0,0 +1,24 @@ +parser = h_in("abc"); + } + public function testSuccess() + { + $result = h_parse($this->parser, "b"); + // TODO: fixme when h_ch is fixed + $this->assertEquals(98, $result); + } + public function testFailure() + { + $result = h_parse($this->parser, "d"); + $this->assertEquals(NULL, $result); + } +} +?> \ No newline at end of file diff --git a/src/bindings/php/Tests/NotInTest.php b/src/bindings/php/Tests/NotInTest.php new file mode 100644 index 0000000..44a12a7 --- /dev/null +++ b/src/bindings/php/Tests/NotInTest.php @@ -0,0 +1,24 @@ +parser = h_not_in("abc"); + } + public function testSuccess() + { + $result = h_parse($this->parser, "d"); + // TODO: fixme when h_ch is fixed + $this->assertEquals(100, $result); + } + public function testFailure() + { + $result = h_parse($this->parser, "b"); + $this->assertEquals(NULL, $result); + } +} +?> \ No newline at end of file