public function testGetSetCountry() { $country = CountryFactory::generate('GBR'); $this->person->setCountry($country); $this->assertInstanceOf('Del\\Entity\\Country', $this->person->getCountry()); $this->assertEquals('GBR', $this->person->getCountry()->getId()); }
public function testRenderFlag() { $country = CountryFactory::generate('GBR'); $flag = Flag::render($country, 'large'); $this->assertContains('<img src="data:', $flag); $flag = Flag::render($country, 'medium'); $this->assertContains('<img src="data:', $flag); $flag = Flag::render($country, 'small'); $this->assertContains('<img src="data:', $flag); $flag = Flag::render($country, 'tiny'); $this->assertContains('<img src="data:', $flag); }
/** * @return Country */ public function getCountry() { return CountryFactory::generate($this->country); }
/** * @return array */ private function getPersonArray() { return ['firstname' => 'Derek', 'middlename' => 'Stephen', 'lastname' => 'McLean', 'aka' => 'Delboy', 'dob' => new DateTime('1978-02-17'), 'birthplace' => 'Glasgow', 'country' => CountryFactory::generate('GBR')]; }