You are here

public function Framework_MockObject_GeneratorTest::testGetMockForTraitWithNonExistentMethodsAndNonAbstractMethods 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::testGetMockForTraitWithNonExistentMethodsAndNonAbstractMethods()

@covers PHPUnit_Framework_MockObject_Generator::getMockForTrait @requires PHP 5.4.0

File

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

Class

Framework_MockObject_GeneratorTest

Code

public function testGetMockForTraitWithNonExistentMethodsAndNonAbstractMethods() {
  $mock = $this->generator
    ->getMockForTrait('AbstractTrait', array(), '', true, true, true, array(
    'nonexistentMethod',
  ));
  $this
    ->assertTrue(method_exists($mock, 'nonexistentMethod'));
  $this
    ->assertTrue(method_exists($mock, 'doSomething'));
  $this
    ->assertTrue($mock
    ->mockableMethod());
  $this
    ->assertTrue($mock
    ->anotherMockableMethod());
}