hammer/src/bindings/php/Tests/InTest.php

23 lines
465 B
PHP
Raw Normal View History

<?php
include_once 'hammer.php';
class InTest extends PHPUnit_Framework_TestCase
{
protected $parser;
protected function setUp()
{
$this->parser = h_in("abc");
}
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);
}
}
?>