nothing_p works; EndTest's failure case is producing an empty array (successful but empty sequence), success case is *also* producing an empty array
This commit is contained in:
parent
9f55409246
commit
fc71e12bea
2 changed files with 22 additions and 3 deletions
|
|
@ -12,15 +12,15 @@ class EndPTest extends PHPUnit_Framework_TestCase
|
|||
|
||||
public function testSuccess()
|
||||
{
|
||||
$result = h_parse($this->parser, ["a"]);
|
||||
$result = h_parse($this->parser, "a");
|
||||
var_dump($result);
|
||||
$this->assertEquals("a", $result);
|
||||
$this->assertEquals(array("a"), $result);
|
||||
}
|
||||
public function testFailure()
|
||||
{
|
||||
$result = h_parse($this->parser, "aa");
|
||||
var_dump($result);
|
||||
$this->assertEquals(NULL, $result);
|
||||
$this->assertEquals(array(), $result);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue