Inheritance: implements Nelmio\Alice\FixtureBuilder\ExpressionLanguage\LexerInterface, use trait Nelmio\Alice\IsAServiceTrait
Example #1
0
 public function testHandOverTheLexificationToItsDecoratedLexerIfStringIsNotEmpty()
 {
     $value = 'bob';
     $decoratedLexerProphecy = $this->prophesize(LexerInterface::class);
     $decoratedLexerProphecy->lex($value)->willReturn($expected = [new \stdClass()]);
     /** @var LexerInterface $decoratedLexer */
     $decoratedLexer = $decoratedLexerProphecy->reveal();
     $lexer = new EmptyValueLexer($decoratedLexer);
     $actual = $lexer->lex($value);
     $this->assertEquals(count($expected), count($actual));
     $this->assertEquals($expected, $actual);
     $decoratedLexerProphecy->lex(Argument::any())->shouldHaveBeenCalledTimes(1);
 }