/** * @expectedException \InvalidArgumentException * @expectedExceptionMessage Invalid token "<foo>" found. */ public function testThrowsAnExceptionWhenAnInvalidValueIsGiven() { $lexer = new SubPatternsLexer(new FakeLexer()); $lexer->lex('<foo>'); }