ChTest and ChRangeTest fail only because their result isn't being coerced to string.
This commit is contained in:
parent
05cdf766ab
commit
282c42139d
1 changed files with 24 additions and 0 deletions
24
src/bindings/php/Tests/ChRangeTest.php
Normal file
24
src/bindings/php/Tests/ChRangeTest.php
Normal 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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue