public function testGetSetCountry() { $expected = Country::getCountryName('FOO'); $this->assertEmpty($this->instance->getCountry()); $this->assertInstanceOf(Authority::class, $this->instance->setCountry($expected)); $this->assertEquals($expected, $this->instance->getCountry()); }
/** * @param ObjectManager $manager * @return LoadTestPostCodes */ protected function loadPostCodeInNewcastle(ObjectManager $manager) { $url = "newcastle.gov.uk"; $auth = new Authority(); $dc = new DistrictCouncil('E08000021', 'Newcastle upon Tyne'); $ew = new ElectoralWard('E05001111', 'Westgate'); $dc->setWebsite($url); $auth->setDistrictCouncil($dc); $auth->setCountry('England'); $auth->setCounty($this->englandGlobalCounty); $auth->setElectoralWard($ew); $auth->setPostcode("NE1 7RS"); $manager->persist($auth); $manager->flush(); return $this; }