diff --git a/src/bindings/php/Tests/ChRangeTest.php b/src/bindings/php/Tests/ChRangeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b726a5dca7f2883a97db94b7540236e18b7a8d23 --- /dev/null +++ b/src/bindings/php/Tests/ChRangeTest.php @@ -0,0 +1,24 @@ +<?php + +include_once 'hammer.php'; + +class ChRangeTest extends PHPUnit_Framework_TestCase +{ + protected $parser; + + protected function setUp() + { + $this->parser = h_ch_range("a", "c"); + } + public function testSuccess() + { + $result = h_parse($this->parser, "b"); + $this->assertEquals("b", $result); + } + public function testFailure() + { + $result = h_parse($this->parser, "d"); + $this->assertEquals(NULL, $result); + } +} +?> \ No newline at end of file