/**
  * @test
  */
 public function it_ignores_requests_without_controller()
 {
     $request = $this->requestForController(null);
     $this->listener->onKernelView($this->createEventWith($request));
     \Phake::verifyNoInteraction($this->templating);
     \Phake::verifyNoInteraction($this->guesser);
 }
예제 #2
0
 public function testNonMagicCallDoesNothing()
 {
     $mock = $this->getMock('Phake_IMock');
     $ref = array();
     $this->handler->invoke($mock, 'foo', array(), $ref);
     Phake::verifyNoInteraction($this->callRecorder);
 }
 public function test_no_current_user_does_nothing()
 {
     Phake::when($this->facade)->wp_get_current_user(Phake::anyParameters())->thenReturn(null);
     $this->client->white_label_pair_callback();
     Phake::verify($this->facade)->wp_get_current_user();
     Phake::verifyNoFurtherInteraction($this->facade);
     Phake::verifyNoInteraction($this->sdk_auth);
 }
 public function test_launchkey_username_in_get_does_nothing()
 {
     unset($_POST['launchkey_username']);
     $_GET['launchkey_username'] = '******';
     $this->client->pair_callback();
     Phake::verifyNoInteraction($this->facade);
     Phake::verifyNoInteraction($this->sdk_auth);
 }
 public function test_user_has_no_auth_does_not_deorbit()
 {
     $this->user->launchkey_auth = null;
     $this->client->logout();
     Phake::verifyNoInteraction($this->sdk_auth);
 }
예제 #6
0
파일: PhakeTest.php 프로젝트: kore/Phake
 public function testVerifyNoInteractionPassesStrict()
 {
     Phake::setClient(Phake::CLIENT_PHPUNIT);
     $mock = Phake::mock('stdClass');
     $assertionCount = self::getCount();
     Phake::verifyNoInteraction($mock);
     $newAssertionCount = self::getCount();
     $this->assertGreaterThan($assertionCount, $newAssertionCount);
 }
 public function test_does_nothing_when_no_nonce()
 {
     $this->wizard->verify_configuration_callback();
     Phake::verifyNoInteraction($this->facade);
 }
 public function test_no_saml_response_does_nothing()
 {
     unset($_REQUEST['SAMLResponse']);
     $this->client->authenticate(null, null, null);
     Phake::verifyNoInteraction($this->facade);
 }
 public function test_does_nothing_when_no_nonce()
 {
     unset($_POST['nonce']);
     $this->wizard->wizard_submit_ajax();
     Phake::verifyNoInteraction($this->facade);
 }
 public function test_does_nothing_when_no_nonce()
 {
     unset($_POST['nonce']);
     $this->wizard->wizard_easy_setup_qr_code();
     Phake::verifyNoInteraction($this->facade);
 }
 public function testTransactionBoundUnitOfWorkLifecycle_Rollback()
 {
     $mockListener = \Phake::mock(UnitOfWorkListenerInterface::class);
     $mockTransactionManager = \Phake::mock(TransactionManagerInterface::class);
     \Phake::when($mockTransactionManager)->startTransaction()->thenReturn(new \stdClass());
     $uow = DefaultUnitOfWork::startAndGet($mockTransactionManager);
     $uow->registerListener($mockListener);
     \Phake::verify($mockTransactionManager)->startTransaction();
     \Phake::verifyNoInteraction($mockListener);
     $uow->rollback();
     \Phake::inOrder(\Phake::verify($mockTransactionManager)->rollbackTransaction(\Phake::anyParameters()), \Phake::verify($mockListener)->onRollback(\Phake::anyParameters()), \Phake::verify($mockListener)->onCleanup(\Phake::equalTo($uow)));
 }