You are here

public function Framework_MockObject_Matcher_ConsecutiveParametersTest::testIntegrationExpectingException in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit-mock-objects/tests/MockObject/Matcher/ConsecutiveParametersTest.php \Framework_MockObject_Matcher_ConsecutiveParametersTest::testIntegrationExpectingException()

File

vendor/phpunit/phpunit-mock-objects/tests/MockObject/Matcher/ConsecutiveParametersTest.php, line 31

Class

Framework_MockObject_Matcher_ConsecutiveParametersTest

Code

public function testIntegrationExpectingException() {
  $mock = $this
    ->getMock('stdClass', array(
    'foo',
  ));
  $mock
    ->expects($this
    ->any())
    ->method('foo')
    ->withConsecutive(array(
    'bar',
  ), array(
    21,
    42,
  ));
  $mock
    ->foo('bar');
  $this
    ->setExpectedException('PHPUnit_Framework_ExpectationFailedException');
  $mock
    ->foo('invalid');
}