Add test for issue 71
This commit is contained in:
parent
831d2ebdbe
commit
4eaebd48aa
@ -293,4 +293,23 @@ class EthabiTest extends TestCase
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* testIssue71
|
||||
* test 33 bytes and 128 bytes string, see: https://github.com/sc0Vu/web3.php/issues/71
|
||||
* string generated from: https://www.lipsum.com/
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testIssue71()
|
||||
{
|
||||
$abi = $this->abi;
|
||||
$specialString = 'Lorem ipsum dolor sit amet metus.';
|
||||
$encodedString = $abi->encodeParameter('string', $specialString);
|
||||
$this->assertEquals($specialString, $abi->decodeParameter('string', $encodedString));
|
||||
|
||||
$specialString = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce pulvinar quam felis, suscipit posuere neque aliquam in cras amet.';
|
||||
$encodedString = $abi->encodeParameter('string', $specialString);
|
||||
$this->assertEquals($specialString, $abi->decodeParameter('string', $encodedString));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user