File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,22 @@ public function doesLeakATinyAmountOfMemory(): void
4747 $ this ->addToAssertionCount (1 );
4848 }
4949
50+ /** @test */
51+ public function doesNotLeakGarbageCollectedMocks (): void
52+ {
53+ $ this ->createMock (stdClass::class);
54+
55+ $ this ->addToAssertionCount (1 );
56+ }
57+
58+ /** @test */
59+ public function doesNotLeakGarbageCollectedProphecyMocks (): void
60+ {
61+ LeakyStaticObject::leak ($ this ->prophesize (stdClass::class));
62+
63+ $ this ->addToAssertionCount (1 );
64+ }
65+
5066 /** @test */
5167 public function doesLeakAMock (): void
5268 {
@@ -55,6 +71,14 @@ public function doesLeakAMock(): void
5571 $ this ->addToAssertionCount (1 );
5672 }
5773
74+ /** @test */
75+ public function doesLeakAProphecyMock (): void
76+ {
77+ LeakyStaticObject::leak ($ this ->prophesize (stdClass::class));
78+
79+ $ this ->addToAssertionCount (1 );
80+ }
81+
5882 /** @test */
5983 public function doesLeakOneObject (): void
6084 {
You can’t perform that action at this time.
0 commit comments