diff options
Diffstat (limited to 'tests/PHPUnit/Unit/Segment/SegmentExpressionTest.php')
-rw-r--r-- | tests/PHPUnit/Unit/Segment/SegmentExpressionTest.php | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/PHPUnit/Unit/Segment/SegmentExpressionTest.php b/tests/PHPUnit/Unit/Segment/SegmentExpressionTest.php index 3351d42b4b..3003f56716 100644 --- a/tests/PHPUnit/Unit/Segment/SegmentExpressionTest.php +++ b/tests/PHPUnit/Unit/Segment/SegmentExpressionTest.php @@ -136,14 +136,11 @@ class SegmentExpressionTest extends \PHPUnit\Framework\TestCase */ public function testBogusFiltersExpectExceptionThrown($bogus) { - try { - $segment = new SegmentExpression($bogus); - $segment->parseSubExpressions(); - $segment->getSql(); - } catch (\Exception $e) { - return; - } - $this->fail('Expected exception not raised for:' . var_export($segment->getSql(), true)); + $this->expectException(\Exception::class); + + $segment = new SegmentExpression($bogus); + $segment->parseSubExpressions(); + $segment->getSql(); } /** |