21 $x =
new EthD20(
'0x3facfa472e86e3edaeaa837f6ba038ac01f7f539');
22 $this->assertSame($x->val(),
'3facfa472e86e3edaeaa837f6ba038ac01f7f539');
23 $this->assertSame($x->hexVal(),
'0x3facfa472e86e3edaeaa837f6ba038ac01f7f539');
24 $this->assertSame($x->getSchemaType(),
"D20");
31 new EthD20(
'0x3facfa472e86e3edaeaa837f6ba038ac01f7f53989');
32 $this->fail(
"Expected exception '" . $exception_message_expected .
"' not thrown");
34 $this->assertTrue(strpos($exception->getMessage(),
"Invalid length") !==
false);
43 $this->fail(
"Expected exception '" . $exception_message_expected .
"' not thrown");
45 $this->assertTrue(strpos($exception->getMessage(),
"Invalid length") !==
false);
52 $a =
new EthD20(
'4f1116b6e1a6e963efffa30c0a8541075cc51c45');
53 $this->assertEquals($a->hexVal(),
'0x4f1116b6e1a6e963efffa30c0a8541075cc51c45');
59 $val =
'0xyz116b6e1a6e963efffa30c0a8541075cc51c45';
60 $exception_message_expected =
'A non well formed hex value encountered: ' . $val;
62 $this->fail(
"Expected exception '" . $exception_message_expected .
"' not thrown");
64 $this->assertEquals($exception->getMessage(), $exception_message_expected);
testEthQ__invalidLengthTooLong()
testEthQ__invalidLengthShort()
testEthQ__notHexPrefixed()