/**
  * Test restore
  */
 public function testRestore()
 {
     $this->manager->restore(Phake::anyParameters());
     Phake::verify($this->strategy1)->support(Phake::anyParameters());
     Phake::verify($this->strategy2)->support(Phake::anyParameters());
     phake::verify($this->strategy1)->restore(Phake::anyParameters());
     phake::verify($this->strategy2, Phake::never())->restore(Phake::anyParameters());
 }
 /**
  * Test restore
  */
 public function testRemove()
 {
     $entity = Phake::mock('OpenOrchestra\\ModelInterface\\Model\\SoftDeleteableInterface');
     $this->manager->remove($entity);
     Phake::verify($this->strategy1)->support(Phake::anyParameters());
     Phake::verify($this->strategy2)->support(Phake::anyParameters());
     phake::verify($this->strategy1)->remove(Phake::anyParameters());
     phake::verify($this->strategy2, Phake::never())->remove(Phake::anyParameters());
 }
コード例 #3
0
 /**
  * testSetRequest
  */
 public function testSetRequest()
 {
     $request = \Phake::mock('Brown298\\DataTablesBundle\\Model\\RequestParameterBag');
     $this->model->setRequest($request);
     phake::verify($request)->getEcho();
 }
コード例 #4
0
 public function testHandleCallbackLogsWithAuthenticateTrueWhenResponseIsTrue()
 {
     $authResponse = new AuthResponse(true, "auth request authRequestId", null, null, null, null, true);
     Phake::when($this->apiService)->handleCallback(Phake::anyParameters())->thenReturn($authResponse);
     $this->authService->handleCallback(array());
     phake::verify($this->apiService)->log("auth request authRequestId", "Authenticate", true);
 }