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);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -8,12 +8,11 @@ class TokenTest extends PHPUnit_Framework_TestCase
|
|||
|
||||
protected function setUp()
|
||||
{
|
||||
$this->parser = hammer::h_token("95\xa2");
|
||||
$this->parser = h_token("95\xa2");
|
||||
}
|
||||
public function testSuccess()
|
||||
{
|
||||
$result = hammer::h_parse($this->parser, "95\xa2");
|
||||
var_dump($result);
|
||||
$result = h_parse($this->parser, "95\xa2");
|
||||
$this->assertEquals("95\xa2", $result);
|
||||
}
|
||||
public function testFailure()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue