本文整理汇总了PHP中Phake::verifyNoOtherInteractions方法的典型用法代码示例。如果您正苦于以下问题:PHP Phake::verifyNoOtherInteractions方法的具体用法?PHP Phake::verifyNoOtherInteractions怎么用?PHP Phake::verifyNoOtherInteractions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phake
的用法示例。
在下文中一共展示了Phake::verifyNoOtherInteractions方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testOnKernelException
public function testOnKernelException()
{
$event = $this->createMockEvent(true, '/mega-backend', new AccessDeniedException());
$lnr = new AjaxAuthenticationValidatingListener('/mega-backend');
$lnr->onKernelException($event);
\Phake::verify($event, \Phake::times(2))->getRequest();
\Phake::verify($event)->getException();
\Phake::verify($event)->setResponse(\Phake::capture($response));
\Phake::verifyNoOtherInteractions($event);
/* @var JsonResponse $response */
$this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\JsonResponse', $response);
$content = json_decode($response->getContent(), true);
$this->assertTrue(is_array($content));
$this->assertArrayHasKey('success', $content);
$this->assertFalse($content['success']);
$this->assertArrayHasKey('message', $content);
$this->assertTrue('' != $content['message']);
}
示例2: testVerifyNoOtherInteractionsWorks
public function testVerifyNoOtherInteractionsWorks()
{
$mock = Phake::mock('PhakeTest_MockedClass');
$mock->foo('a');
$mock->foo('b');
Phake::verify($mock)->foo('a');
Phake::verify($mock)->foo('b');
Phake::verifyNoOtherInteractions($mock);
}