function it_returns_services_which_are_defined_using_tags() { $obj = new \StdClass(); $this->define('some_service', function () use($obj) { return $obj; }, ['some_tag']); $this->getByTag('some_tag')->shouldReturn([$obj]); }