You are here

public function Framework_MockObjectTest::testGetMockForTrait in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php \Framework_MockObjectTest::testGetMockForTrait()

@requires PHP 5.4.0

File

vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php, line 413

Class

Framework_MockObjectTest
@since Class available since Release 3.0.0

Code

public function testGetMockForTrait() {
  $mock = $this
    ->getMockForTrait('AbstractTrait');
  $mock
    ->expects($this
    ->never())
    ->method('doSomething');
  $parent = get_parent_class($mock);
  $traits = class_uses($parent, false);
  $this
    ->assertContains('AbstractTrait', $traits);
}