You are here

public function Framework_MockObject_GeneratorTest::testGetMockForAbstractClassShouldCreateStubsOnlyForAbstractMethodWhenNoMethodsWereInformed in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit-mock-objects/tests/GeneratorTest.php \Framework_MockObject_GeneratorTest::testGetMockForAbstractClassShouldCreateStubsOnlyForAbstractMethodWhenNoMethodsWereInformed()

@covers PHPUnit_Framework_MockObject_Generator::getMockForAbstractClass

File

vendor/phpunit/phpunit-mock-objects/tests/GeneratorTest.php, line 82

Class

Framework_MockObject_GeneratorTest

Code

public function testGetMockForAbstractClassShouldCreateStubsOnlyForAbstractMethodWhenNoMethodsWereInformed() {
  $mock = $this->generator
    ->getMockForAbstractClass('AbstractMockTestClass');
  $mock
    ->expects($this
    ->any())
    ->method('doSomething')
    ->willReturn('testing');
  $this
    ->assertEquals('testing', $mock
    ->doSomething());
  $this
    ->assertEquals(1, $mock
    ->returnAnything());
}