| 1 | <?php |
||
| 11 | class ParserExceptionSpec extends ObjectBehavior |
||
| 12 | { |
||
| 13 | const ERRORS = ['foo', 'bar']; |
||
| 14 | |||
| 15 | function let() |
||
| 16 | { |
||
| 17 | $this->beConstructedWith(self::ERRORS); |
||
| 18 | } |
||
| 19 | |||
| 20 | function it_is_initializable() |
||
| 21 | { |
||
| 22 | $this->shouldHaveType(ParserException::CLASS); |
||
| 23 | } |
||
| 24 | |||
| 25 | function it_is_throwable() |
||
| 26 | { |
||
| 27 | $this->shouldHaveType(\Throwable::CLASS); |
||
| 28 | } |
||
| 29 | |||
| 30 | function it_contains_error_messages() |
||
| 31 | { |
||
| 32 | $this->getErrors()->shouldEqual(self::ERRORS); |
||
| 33 | } |
||
| 34 | |||
| 35 | function it_contains_an_exception_message() |
||
| 36 | { |
||
| 37 | $this->__tostring()->shouldMatch('/foo/'); |
||
| 38 | $this->__tostring()->shouldMatch('/bar/'); |
||
| 39 | } |
||
| 40 | } |
||
| 41 |