Esempio n. 1
0
 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());
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 /**
  * @return Country
  */
 public function getCountry()
 {
     return CountryFactory::generate($this->country);
 }
Esempio n. 4
0
 /**
  * @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')];
 }