Ejemplo n.º 1
0
 public function testTypes()
 {
     $types = new Types();
     $types->sequence = 123;
     $types->clientForename = "Lucius Junius";
     $types->clientSurname = "Brutus";
     $types->clientMobile = "01234567890";
     $types->clientEmail = "*****@*****.**";
     $types->supplierForename = "Leslie";
     $types->supplierSurname = "Lamport";
     $types->supplierMobile = "01987654321";
     $types->supplierEmail = "*****@*****.**";
     $msg = $types->serialize();
     $this->assertSame("dee674a1bcac455b7cd1801f4008c65d0a37b2ea", sha1($msg));
     $typesRcvd = new Types($msg);
     $typesRcvd->unserialize();
     $msg = $typesRcvd->serialize();
     $this->assertSame("dee674a1bcac455b7cd1801f4008c65d0a37b2ea", sha1($msg));
     $this->assertEquals($types, $typesRcvd);
 }