TT_BYTES is converting properly; TT_UINT is not.
This commit is contained in:
parent
49ca034b32
commit
ddbde60396
3 changed files with 84 additions and 27 deletions
24
src/bindings/php/Tests/ChTest.php
Normal file
24
src/bindings/php/Tests/ChTest.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
include_once 'hammer.php';
|
||||
|
||||
class ChTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
protected $parser;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
$this->parser = h_ch("\xa2");
|
||||
}
|
||||
public function testSuccess()
|
||||
{
|
||||
$result = h_parse($this->parser, "\xa2");
|
||||
$this->assertEquals("\xa2", $result);
|
||||
}
|
||||
public function testFailure()
|
||||
{
|
||||
$result = h_parse($this->parser, "95");
|
||||
$this->assertEquals(NULL, $result);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue