Esempio n. 1
0
 public function testToArray()
 {
     $customerInfo = new CustomerInfo();
     $customerInfo->setName('John Doe')->setDescription('Payment #1')->setObservation('test')->setMobile('800600600')->setEmail('*****@*****.**');
     $marshall = $customerInfo->toArray();
     $this->assertTrue(is_array($marshall));
     $this->assertCount(5, array_values($marshall));
     $this->assertEquals('John Doe', $customerInfo->getName());
     $this->assertEquals('John Doe', $marshall['o_name']);
     $this->assertEquals('Payment #1', $customerInfo->getDescription());
     $this->assertEquals('Payment #1', $marshall['o_description']);
     $this->assertEquals('test', $customerInfo->getObservation());
     $this->assertEquals('test', $marshall['o_obs']);
     $this->assertEquals('800600600', $customerInfo->getMobile());
     $this->assertEquals('800600600', $marshall['o_mobile']);
     $this->assertEquals('*****@*****.**', $customerInfo->getEmail());
     $this->assertEquals('*****@*****.**', $marshall['o_email']);
 }