public function testHas() { $locator = $this->getServiceLocator([ 'foo' => fn() => 'bar', 'bar' => fn() => 'baz', fn() => 'dummy', ]); $this->assertTrue($locator->has('foo')); $this->assertTrue($locator->has('bar')); $this->assertFalse($locator->has('dummy')); }