Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function testMemo() |
||
14 | { |
||
15 | $blob = "So long, and thanks for all the pizza!"; |
||
16 | |||
17 | $ack = new PaymentACK(); |
||
18 | $ack->setPayment(new Payment()); |
||
19 | $this->assertFalse($ack->hasMemo()); |
||
20 | $ack->setMemo($blob); |
||
21 | $this->assertTrue($ack->hasMemo()); |
||
22 | |||
23 | $serialized = $ack->serialize(); |
||
24 | $p1 = new PaymentACK(); |
||
25 | $p1->parse($serialized); |
||
26 | |||
27 | $this->assertEquals($blob, $p1->getMemo()); |
||
28 | |||
29 | $ack->clearMemo(); |
||
30 | $this->assertFalse($ack->hasMemo()); |
||
31 | } |
||
32 | |||
56 |