示例#1
0
 /**
  * @test
  */
 public function it_should_return_constructor_data()
 {
     $event1 = $this->createDojoEventMock();
     $event2 = $this->createDojoEventMock();
     $this->dojo->addDojo($event1);
     $this->dojo->addDojo($event2);
     $this->assertSame('chris', $this->dojo->getName());
     $this->assertSame('street', $this->dojo->getStreet());
     $this->assertSame('10', $this->dojo->getHousenumber());
     $this->assertSame('1234aa', $this->dojo->getPostalcode());
     $this->assertSame('city', $this->dojo->getCity());
     $this->assertSame('facebook', $this->dojo->getFacebook());
     $this->assertSame('twitter', $this->dojo->getTwitter());
     $this->assertSame('website', $this->dojo->getWebsite());
     $this->assertSame('location', $this->dojo->getLocation());
     $this->assertSame('organiser', $this->dojo->getOrganiser());
     $this->assertCount(2, $this->dojo->getDojos());
     $this->dojo->removeDojo($event1);
     $this->assertCount(1, $this->dojo->getDojos());
 }
 /**
  * Serialize dojo manually due to FosUserBundle adding password and salt
  * @TODO: Seperate dojo from user account
  *
  * @param User $dojo
  * @return array
  */
 private function serializeDojo(User $dojo)
 {
     return ["id" => $dojo->getId(), "email" => $dojo->getEmail(), "name" => $dojo->getName(), "location" => $dojo->getLocation(), "street" => $dojo->getStreet(), "housenumber" => $dojo->getHousenumber(), "postalcode" => $dojo->getPostalcode(), "city" => $dojo->getCity(), "lat" => $dojo->getLat(), "long" => $dojo->getLong(), "facebook" => $dojo->getFacebook(), "twitter" => $dojo->getTwitter(), "website" => $dojo->getFacebook()];
 }