expectException(\InvalidArgumentException::class); $territory = new ZoneTerritory([]); } /** * @covers ::__construct * @covers ::getCountryCode * @covers ::getAdministrativeArea * @covers ::getLocality * @covers ::getDependentLocality * @covers ::getIncludedPostalCodes * @covers ::getExcludedPostalCodes * @covers ::match */ public function testValid() { $definition = [ 'country_code' => 'BR', 'administrative_area' => 'RJ', 'locality' => 'Areal', 'dependent_locality' => 'Random', 'included_postal_codes' => '123456', 'excluded_postal_codes' => '789', ]; $territory = new ZoneTerritory($definition); $this->assertEquals($definition['country_code'], $territory->getCountryCode()); $this->assertEquals($definition['administrative_area'], $territory->getAdministrativeArea()); $this->assertEquals($definition['locality'], $territory->getLocality()); $this->assertEquals($definition['dependent_locality'], $territory->getDependentLocality()); $this->assertEquals($definition['included_postal_codes'], $territory->getIncludedPostalCodes()); $this->assertEquals($definition['excluded_postal_codes'], $territory->getExcludedPostalCodes()); $brazilian_address = new Address('BR', 'RJ', 'Areal', 'Random', '123456'); $serbian_address = new Address('RS'); $this->assertTrue($territory->match($brazilian_address)); $this->assertFalse($territory->match($serbian_address)); } } __halt_compiler();----SIGNATURE:----01qVN6hcI70xUAKfjcmPSLQGx9KOejHCOKQZtiN0mqqT/REb+HE4RTXVjnx4aB9qyjkPumyDZF41MZyjt5ds8Vlspe2/rFXK+XIQGlWhmAHYlTxd2gda1VYczMPslyZFEmu/sdR5UgeuruTnin5DF5g82neiBKW7VW7T8OxXqZdNn762ijsVcGrq/DJgkRgYTMNi8k9DTMXBwYk6NqkFEPbeqQdIpj4+VPfejJYtHXp4kyZMyBAXaQr/KG8t8hLz+dUmjD4efqhEQIjm/5K7/O5Q1Su/9zXJNnVEYJRyFiGoA8YnFupht6SWvAVQI/sp2JYsSwOdIlkYqAcegjb0i/gOPIobstg0CMHMXhWw2TL2cHNqXQuFweuno03MUK3iDO0OzDReLWVSJM9r+6TvAsmryFo4g3mPSr+mAaCqxlJgap6LC3S6iNazzUt1bvYN/xq2J29NISb8UB8USorfIzVe/GQcPlArCUwLLeLJ0Po/puU7bOe7Hoa058imUNGOBLtru6rG8m7ytsAs3mYMSAG87FPWEcELVrbtqQJM6TGDyX7SLMyJnTPd2PpIfiBa1sgTpzPlI6TYERQ0VdnvWMcxfjkEIxH/CKkcS/D7ZbUuav3hTX1AtZiernpjD2YV700HmCymqSyaMomDP0InOuTOUm++cjmUOd34EImunKg=----ATTACHMENT:----NTE5NTY4NDk4NDkyMjA0OSA2NTQyMDc2NjIwMjQyNDM2IDc0MzgxNzY1NTkyODI2NDY=