File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
tests/unit/Framework/MockObject/Creation Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 18
18
use PHPUnit \TestFixture \MockObject \AnInterface ;
19
19
use PHPUnit \TestFixture \MockObject \AnotherInterface ;
20
20
use PHPUnit \TestFixture \MockObject \AnotherInterfaceThatDoesSomething ;
21
+ use PHPUnit \TestFixture \MockObject \ExtendableClass ;
21
22
22
23
#[Group('test-doubles ' )]
23
24
#[Group('test-doubles/creation ' )]
@@ -71,4 +72,12 @@ public function testCannotCreateTestStubForIntersectionOfInterfacesThatDeclareTh
71
72
72
73
$ this ->createStubForIntersectionOfInterfaces ([AnInterface::class, AnotherInterfaceThatDoesSomething::class]);
73
74
}
75
+
76
+ public function testCannotCreateTestStubForIntersectionOfInterfacesWhenClassIsUsed (): void
77
+ {
78
+ $ this ->expectException (UnknownTypeException::class);
79
+ $ this ->expectExceptionMessage ('Class or interface "PHPUnit\TestFixture\MockObject\ExtendableClass" does not exist ' );
80
+
81
+ $ this ->createStubForIntersectionOfInterfaces ([AnInterface::class, ExtendableClass::class]);
82
+ }
74
83
}
You can’t perform that action at this time.
0 commit comments