function it_should_return_token_type_on_match(ITokenType $tokenType, IRequest $request) { $tokenType->match($request)->willReturn(true)->shouldBeCalled(); $this->accept($tokenType); $this->resolve($request)->shouldReturn($tokenType); }