Exemplo n.º 1
0
 public function testConstructorSetBoth()
 {
     $street = '95 Second Avenue';
     $postcode = new PostCode('EX2 7BH');
     $address = new Address($street, $postcode);
     $this->assertSame($street, $address->getStreet());
     $this->assertSame($postcode, $address->getPostcode());
 }
Exemplo n.º 2
0
 public function testBoth()
 {
     $postcode = new PostCode('EX2 7BH');
     $street = '95 Second Avenue';
     $expected = '95 Second Avenue, EX2 7BH';
     $address = new Address($street, $postcode);
     $this->assertEquals($expected, $address->getInline());
     $this->assertEquals($expected, (string) $address);
 }