Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit 482716d

Browse files
committed
[zendframework/zendframework#3376] Added test for new behavior
- Added a test displaying that an exception is raised when passing the "e" modifier in a pattern
1 parent 37d3acb commit 482716d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

test/PregReplaceTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,11 @@ public function testFilterThrowsExceptionWhenNoMatchPatternPresent()
9797
'does not have a valid pattern set');
9898
$filtered = $filter($string);
9999
}
100+
101+
public function testPassingPatternWithExecModifierRaisesException()
102+
{
103+
$filter = new PregReplaceFilter();
104+
$this->setExpectedException('Zend\Filter\Exception\InvalidArgumentException', '"e" pattern modifier');
105+
$filter->setPattern('/foo/e');
106+
}
100107
}

0 commit comments

Comments
 (0)