Skip to content

Commit

Permalink
add last dot and put anchors to regex
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed Nov 16, 2017
1 parent 74a9d8d commit e72875f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/TestCase/View/ViewTest.php
Expand Up @@ -939,7 +939,7 @@ public function testPrefixElement()
public function testElementNonExistent()
{
$this->expectException(\Cake\View\Exception\MissingElementException::class);
$this->expectExceptionMessageRegExp('$Element file \"Element[\\|/]non_existent_element\.ctp\" is missing$');
$this->expectExceptionMessageRegExp('#^Element file \"Element[\\|/]non_existent_element\.ctp\" is missing\.$#');

$this->View->element('non_existent_element');
}
Expand All @@ -952,7 +952,7 @@ public function testElementNonExistent()
public function testElementInexistentPluginElement()
{
$this->expectException(\Cake\View\Exception\MissingElementException::class);
$this->expectExceptionMessageRegExp('$Element file "test_plugin\.Element[\\|/]plugin_element\.ctp\" is missing$');
$this->expectExceptionMessageRegExp('#^Element file "test_plugin\.Element[\\|/]plugin_element\.ctp\" is missing\.$#');

$this->View->element('test_plugin.plugin_element');
}
Expand Down

0 comments on commit e72875f

Please sign in to comment.