public function Framework_MockObjectTest::testMockClassStoreOverrulable in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php \Framework_MockObjectTest::testMockClassStoreOverrulable()
File
- vendor/
phpunit/ phpunit-mock-objects/ tests/ MockObjectTest.php, line 329
Class
- Framework_MockObjectTest
- @since Class available since Release 3.0.0
Code
public function testMockClassStoreOverrulable() {
$mock1 = $this
->getMock('PartialMockTestClass');
$mock2 = $this
->getMock('PartialMockTestClass', array(), array(), 'MyMockClassNameForPartialMockTestClass1');
$mock3 = $this
->getMock('PartialMockTestClass');
$mock4 = $this
->getMock('PartialMockTestClass', array(
'doSomething',
), array(), 'AnotherMockClassNameForPartialMockTestClass');
$mock5 = $this
->getMock('PartialMockTestClass', array(), array(), 'MyMockClassNameForPartialMockTestClass2');
$this
->assertNotEquals(get_class($mock1), get_class($mock2));
$this
->assertEquals(get_class($mock1), get_class($mock3));
$this
->assertNotEquals(get_class($mock1), get_class($mock4));
$this
->assertNotEquals(get_class($mock2), get_class($mock3));
$this
->assertNotEquals(get_class($mock2), get_class($mock4));
$this
->assertNotEquals(get_class($mock2), get_class($mock5));
$this
->assertNotEquals(get_class($mock3), get_class($mock4));
$this
->assertNotEquals(get_class($mock3), get_class($mock5));
$this
->assertNotEquals(get_class($mock4), get_class($mock5));
}