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

Commit

Permalink
[zendframework/zendframework#3376] Added test for new behavior
Browse files Browse the repository at this point in the history
- Added a test displaying that an exception is raised when passing the
  "e" modifier in a pattern
  • Loading branch information
weierophinney committed Jan 14, 2013
1 parent 37d3acb commit 482716d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/PregReplaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}

0 comments on commit 482716d

Please sign in to comment.