Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | public function testCallGetNextStateWithAnInvalidTokenWillThrowAnException() |
||
26 | { |
||
27 | $tokenStore = m::mock(TokenStoreInterface::class); |
||
28 | $tokenStore->shouldReceive('getTokens') |
||
29 | ->andReturn([]); |
||
30 | $state = new State($tokenStore); |
||
31 | |||
32 | $state->addStateTarget(Token::T_CONTENT, $state); |
||
33 | |||
34 | static::assertSame($state, $state->getNextState(Token::T_CONTENT)); |
||
35 | |||
36 | static::expectException(RuntimeException::class); |
||
37 | $state->getNextState(Token::T_ESCAPE); |
||
38 | } |
||
39 | } |
||
40 |