/**
  *
  * @param User $user
  */
 public function setUser(User $user)
 {
     $this->user = $user;
     if (!in_array($this, $user->getServices())) {
         $this->user->addService($this);
     }
 }
Exemplo n.º 2
0
 /**
  * @expectedException InvalidArgumentException
  */
 public function testException1()
 {
     $user = new User("testUser");
     $service = new Service("");
     $user->addService($service);
 }