From 482716d3afff8402564ed01106e2172d05ad8dcd Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Mon, 14 Jan 2013 16:00:39 -0600 Subject: [PATCH] [zendframework/zf2#3376] Added test for new behavior - Added a test displaying that an exception is raised when passing the "e" modifier in a pattern --- test/PregReplaceTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/PregReplaceTest.php b/test/PregReplaceTest.php index 1dc14a06..bc38f066 100644 --- a/test/PregReplaceTest.php +++ b/test/PregReplaceTest.php @@ -97,4 +97,11 @@ public function testFilterThrowsExceptionWhenNoMatchPatternPresent() 'does not have a valid pattern set'); $filtered = $filter($string); } + + public function testPassingPatternWithExecModifierRaisesException() + { + $filter = new PregReplaceFilter(); + $this->setExpectedException('Zend\Filter\Exception\InvalidArgumentException', '"e" pattern modifier'); + $filter->setPattern('/foo/e'); + } }