Skip to content
This repository was archived by the owner on Feb 20, 2023. It is now read-only.

Commit 2a23783

Browse files
committed
Test cases for #100
1 parent 67e7f00 commit 2a23783

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Tests/MockObjectTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,20 @@ public function testGetMockForAbstractClass()
320320
->method('doSomething');
321321
}
322322

323+
public function testClonedMockObjectShouldStillEqualTheOriginal()
324+
{
325+
$a = $this->getMock('stdClass');
326+
$b = clone $a;
327+
$this->assertEquals($a, $b);
328+
}
329+
330+
public function testMockObjectsConstructedIndepentantlyShouldNotEqual()
331+
{
332+
$a = $this->getMock('stdClass');
333+
$b = $this->getMock('stdClass');
334+
$this->assertNotEquals($a,$b);
335+
}
336+
323337
public function testStaticMethodCallWithArgumentCloningEnabled()
324338
{
325339
$expectedObject = new StdClass;

0 commit comments

Comments
 (0)