We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 50bf3ee commit 952cf61Copy full SHA for 952cf61
1 file changed
Tests/Unit/ExceptionsTest.php
@@ -91,6 +91,14 @@ public function testExceptionForInvokeMethod()
91
($this->di)([new TestExceptionForInvokeMethod, 'fail']);
92
}
93
94
+ public function testInterfaceToInterfaceBinding()
95
+ {
96
+ $this->expectException(DIException::class);
97
+ $this->expectExceptionCode(DIException::E_CANNOT_BIND_INTERFACE);
98
+ $this->expectExceptionMessage('Only interface to class binding is allowed. Cannot bind interface ');
99
+ $this->di->bind(TestInterface::class, TestOtherInterface::class);
100
+ }
101
+
102
protected function createContainer(): DIContainer
103
{
104
return new DIContainer;
0 commit comments