1 | <?php |
||
10 | class ExpressionParserTest extends TestCase |
||
11 | { |
||
12 | public function provideInvalidData() |
||
13 | { |
||
14 | return [ |
||
15 | 'empty string' => [ |
||
16 | 'input' => '', |
||
17 | ], |
||
18 | 'invalid tag' => [ |
||
19 | 'input' => 'x:2:"aa";', |
||
20 | ], |
||
21 | ]; |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * @covers \xKerman\Restricted\ExpressionParser |
||
26 | * @dataProvider provideInvalidData |
||
27 | * @expectedException \xKerman\Restricted\UnserializeFailedException |
||
28 | */ |
||
29 | public function testParseFailure($input) |
||
30 | { |
||
31 | $source = new Source($input); |
||
32 | $parser = new ExpressionParser(); |
||
33 | $parser->parse($source); |
||
34 | } |
||
35 | } |
||
36 |