resolver = new SubcommandStrategyResolver(); } /** * @return void */ public function testResolveCorrectStrategy(): void { $expectedStrategy = new LoadStrategy(); $this->assertEquals($expectedStrategy, $this->resolver->resolve('functions', 'load')); } /** * @return void */ public function testResolveThrowsExceptionOnNonExistingStrategy(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Non-existing container command given'); $this->resolver->resolve('foo', 'bar'); } }