ChTest and ChRangeTest fail only because their result isn't being coerced to string.

This commit is contained in:
Meredith L. Patterson 2013-11-24 20:30:19 -06:00
parent 05cdf766ab
commit 282c42139d

View file

@ -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);
}
}
?>