public function Framework_MockObjectTest::testGetMockWithFixedClassNameCanProduceTheSameMockTwice

@covers PHPUnit_Framework_MockObject_Generator::getMock

File

drupal/core/vendor/phpunit/phpunit-mock-objects/Tests/MockObjectTest.php, line 257

Class

Framework_MockObjectTest
@package PHPUnit_MockObject @author Sebastian Bergmann <sb@sebastian-bergmann.de> @author Patrick Mueller <elias0@gmx.net> @author Frank Kleine <mikey@stubbles.net> @copyright 2010-2013 Sebastian Bergmann…

Code

public function testGetMockWithFixedClassNameCanProduceTheSameMockTwice() {
  $mock = $this
    ->getMockBuilder('StdClass')
    ->setMockClassName('FixedName')
    ->getMock();
  $mock = $this
    ->getMockBuilder('StdClass')
    ->setMockClassName('FixedName')
    ->getMock();
  $this
    ->assertInstanceOf('StdClass', $mock);
}