$handler) { $class = $attributeLocator->getHandlerForCommand($command); $this->assertInstanceOf($handler, $class); } } public function testThrowsOnCannotResolve(): void { $attributeLocator = new AttributeLocator(); $this->expectException(CanNotInvokeHandlerException::class); $attributeLocator->getHandlerForCommand('NonExistentCommand'); } }