diff --git a/lib/Cake/Test/Case/BasicsTest.php b/lib/Cake/Test/Case/BasicsTest.php index bc306cfda..4dcff7d3d 100644 --- a/lib/Cake/Test/Case/BasicsTest.php +++ b/lib/Cake/Test/Case/BasicsTest.php @@ -807,7 +807,7 @@ class BasicsTest extends CakeTestCase { $result = file_get_contents(LOGS . 'error.log'); $this->assertMatchesRegularExpression('/Error: Testing LogError\(\) basic function/', $result); - $this->assertNotRegExp("/Error: Testing with\nmulti-line\nstring/", $result); + $this->assertDoesNotMatchRegularExpression("/Error: Testing with\nmulti-line\nstring/", $result); $this->assertMatchesRegularExpression('/Error: Testing with multi-line string/', $result); } diff --git a/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php b/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php index 6aa2c9042..206fec074 100644 --- a/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php +++ b/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php @@ -358,8 +358,8 @@ class SchemaShellTest extends CakeTestCase { $this->assertMatchesRegularExpression('/public \$auth_users/', $contents); $this->assertMatchesRegularExpression('/public \$authors/', $contents); $this->assertMatchesRegularExpression('/public \$test_plugin_comments/', $contents); - $this->assertNotRegExp('/public \$users/', $contents); - $this->assertNotRegExp('/public \$articles/', $contents); + $this->assertDoesNotMatchRegularExpression('/public \$users/', $contents); + $this->assertDoesNotMatchRegularExpression('/public \$articles/', $contents); CakePlugin::unload(); } @@ -391,9 +391,9 @@ class SchemaShellTest extends CakeTestCase { $this->assertMatchesRegularExpression('/class TestPluginSchema/', $contents); $this->assertMatchesRegularExpression('/public \$test_plugin_comments/', $contents); - $this->assertNotRegExp('/public \$authors/', $contents); - $this->assertNotRegExp('/public \$auth_users/', $contents); - $this->assertNotRegExp('/public \$posts/', $contents); + $this->assertDoesNotMatchRegularExpression('/public \$authors/', $contents); + $this->assertDoesNotMatchRegularExpression('/public \$auth_users/', $contents); + $this->assertDoesNotMatchRegularExpression('/public \$posts/', $contents); CakePlugin::unload(); } diff --git a/lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php index eea57f634..467bb8d6b 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php @@ -140,7 +140,7 @@ class ExtractTaskTest extends CakeTestCase { $this->assertMatchesRegularExpression($pattern, $result); $pattern = '/msgid "You have %d new message."\nmsgstr ""/'; - $this->assertNotRegExp($pattern, $result, 'No duplicate msgid'); + $this->assertDoesNotMatchRegularExpression($pattern, $result, 'No duplicate msgid'); $pattern = '/\#: extract\.ctp:7\n'; $pattern .= 'msgid "You deleted %d message."\nmsgid_plural "You deleted %d messages."/'; @@ -181,9 +181,9 @@ class ExtractTaskTest extends CakeTestCase { $result = file_get_contents($this->path . DS . 'domain.pot'); $pattern = '/msgid "You have %d new message."\nmsgid_plural "You have %d new messages."/'; - $this->assertNotRegExp($pattern, $result); + $this->assertDoesNotMatchRegularExpression($pattern, $result); $pattern = '/msgid "You deleted %d message."\nmsgid_plural "You deleted %d messages."/'; - $this->assertNotRegExp($pattern, $result); + $this->assertDoesNotMatchRegularExpression($pattern, $result); $pattern = '/msgid "You have %d new message \(domain\)."\nmsgid_plural "You have %d new messages \(domain\)."/'; $this->assertMatchesRegularExpression($pattern, $result); @@ -215,10 +215,10 @@ class ExtractTaskTest extends CakeTestCase { $result = file_get_contents($this->path . DS . 'default.pot'); $pattern = '/\#: .*extract\.ctp:31\n/'; - $this->assertNotRegExp($pattern, $result); + $this->assertDoesNotMatchRegularExpression($pattern, $result); $pattern = '/\#: .*extract\.ctp:33\n/'; - $this->assertNotRegExp($pattern, $result); + $this->assertDoesNotMatchRegularExpression($pattern, $result); } /** @@ -246,7 +246,7 @@ class ExtractTaskTest extends CakeTestCase { $result = file_get_contents($this->path . DS . 'default.pot'); $pattern = '/\n\#: .*\n/'; - $this->assertNotRegExp($pattern, $result); + $this->assertDoesNotMatchRegularExpression($pattern, $result); } /** @@ -270,10 +270,10 @@ class ExtractTaskTest extends CakeTestCase { $result = file_get_contents($this->path . DS . 'default.pot'); $pattern = '/\#: .*extract\.ctp:6\n/'; - $this->assertNotRegExp($pattern, $result); + $this->assertDoesNotMatchRegularExpression($pattern, $result); $pattern = '/\#: .*default\.ctp:26\n/'; - $this->assertNotRegExp($pattern, $result); + $this->assertDoesNotMatchRegularExpression($pattern, $result); } /** @@ -323,7 +323,7 @@ class ExtractTaskTest extends CakeTestCase { $this->Task->execute(); $result = file_get_contents($this->path . DS . 'default.pot'); - $this->assertNotRegExp('#TestPlugin#', $result); + $this->assertDoesNotMatchRegularExpression('#TestPlugin#', $result); } /** @@ -348,7 +348,7 @@ class ExtractTaskTest extends CakeTestCase { $this->Task->execute(); $result = file_get_contents($this->path . DS . 'default.pot'); - $this->assertNotRegExp('#Pages#', $result); + $this->assertDoesNotMatchRegularExpression('#Pages#', $result); $this->assertContains('translate.ctp:1', $result); $this->assertContains('This is a translatable string', $result); $this->assertContains('I can haz plugin model validation message', $result); @@ -498,9 +498,9 @@ class ExtractTaskTest extends CakeTestCase { $result = file_get_contents($this->path . DS . 'cake_dev.pot'); $pattern = '/#: Console\/Templates\//'; - $this->assertNotRegExp($pattern, $result); + $this->assertDoesNotMatchRegularExpression($pattern, $result); $pattern = '/#: Test\//'; - $this->assertNotRegExp($pattern, $result); + $this->assertDoesNotMatchRegularExpression($pattern, $result); } } diff --git a/lib/Cake/Test/Case/Console/Command/Task/ProjectTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/ProjectTaskTest.php index 33d5eb143..72c5563c1 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/ProjectTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/ProjectTaskTest.php @@ -227,7 +227,7 @@ class ProjectTaskTest extends CakeTestCase { $File = new File($path . 'Config' . DS . 'core.php'); $contents = $File->read(); - $this->assertNotRegExp('/DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi/', $contents, 'Default Salt left behind. %s'); + $this->assertDoesNotMatchRegularExpression('/DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi/', $contents, 'Default Salt left behind. %s'); } /** @@ -244,7 +244,7 @@ class ProjectTaskTest extends CakeTestCase { $File = new File($path . 'Config' . DS . 'core.php'); $contents = $File->read(); - $this->assertNotRegExp('/76859309657453542496749683645/', $contents, 'Default CipherSeed left behind. %s'); + $this->assertDoesNotMatchRegularExpression('/76859309657453542496749683645/', $contents, 'Default CipherSeed left behind. %s'); } /** @@ -262,7 +262,7 @@ class ProjectTaskTest extends CakeTestCase { $File = new File($path . 'Config' . DS . 'core.php'); $contents = $File->read(); $this->assertMatchesRegularExpression('/\$prefix = \'.+\';/', $contents, '$prefix is not defined'); - $this->assertNotRegExp('/\$prefix = \'myapp_\';/', $contents, 'Default cache prefix left behind. %s'); + $this->assertDoesNotMatchRegularExpression('/\$prefix = \'myapp_\';/', $contents, 'Default cache prefix left behind. %s'); } /** @@ -278,10 +278,10 @@ class ProjectTaskTest extends CakeTestCase { $File = new File($path . 'webroot' . DS . 'index.php'); $contents = $File->read(); - $this->assertNotRegExp('/define\(\'CAKE_CORE_INCLUDE_PATH\', ROOT/', $contents); + $this->assertDoesNotMatchRegularExpression('/define\(\'CAKE_CORE_INCLUDE_PATH\', ROOT/', $contents); $File = new File($path . 'webroot' . DS . 'test.php'); $contents = $File->read(); - $this->assertNotRegExp('/define\(\'CAKE_CORE_INCLUDE_PATH\', ROOT/', $contents); + $this->assertDoesNotMatchRegularExpression('/define\(\'CAKE_CORE_INCLUDE_PATH\', ROOT/', $contents); } /** @@ -380,6 +380,6 @@ class ProjectTaskTest extends CakeTestCase { $File = new File($path . 'Console' . DS . 'cake.php'); $contents = $File->read(); - $this->assertNotRegExp('/__CAKE_PATH__/', $contents, 'Console path placeholder left behind.'); + $this->assertDoesNotMatchRegularExpression('/__CAKE_PATH__/', $contents, 'Console path placeholder left behind.'); } } diff --git a/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php b/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php index 19693e589..8b2c9d03c 100644 --- a/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php @@ -731,14 +731,14 @@ HTMLBLOC; $this->Controller->EmailTest->sendAs = 'html'; $this->assertTrue($this->Controller->EmailTest->send($body)); $msg = DebugCompTransport::$lastEmail; - $this->assertNotRegExp('/text\/plain/', $msg); + $this->assertDoesNotMatchRegularExpression('/text\/plain/', $msg); $this->assertMatchesRegularExpression('/text\/html/', $msg); $this->Controller->EmailTest->sendAs = 'text'; $this->assertTrue($this->Controller->EmailTest->send($body)); $msg = DebugCompTransport::$lastEmail; $this->assertMatchesRegularExpression('/text\/plain/', $msg); - $this->assertNotRegExp('/text\/html/', $msg); + $this->assertDoesNotMatchRegularExpression('/text\/html/', $msg); $this->Controller->EmailTest->sendAs = 'both'; $this->assertTrue($this->Controller->EmailTest->send($body)); @@ -767,7 +767,7 @@ HTMLBLOC; $this->assertTrue($this->Controller->EmailTest->send($body)); $msg = DebugCompTransport::$lastEmail; - $this->assertNotRegExp('/\n\nContent-Transfer-Encoding/', $msg); + $this->assertDoesNotMatchRegularExpression('/\n\nContent-Transfer-Encoding/', $msg); $this->assertMatchesRegularExpression('/\nContent-Transfer-Encoding/', $msg); } @@ -881,7 +881,7 @@ HTMLBLOC; $this->assertTrue($this->Controller->EmailTest->send('This is the body of the message')); $result = DebugCompTransport::$lastEmail; - $this->assertNotRegExp('/Message-ID:/', $result); + $this->assertDoesNotMatchRegularExpression('/Message-ID:/', $result); } /** diff --git a/lib/Cake/Test/Case/Controller/ScaffoldTest.php b/lib/Cake/Test/Case/Controller/ScaffoldTest.php index 5f745ad77..cbad1a32e 100644 --- a/lib/Cake/Test/Case/Controller/ScaffoldTest.php +++ b/lib/Cake/Test/Case/Controller/ScaffoldTest.php @@ -376,7 +376,7 @@ class ScaffoldTest extends CakeTestCase { $this->Controller->response->send(); $result = ob_get_clean(); - $this->assertNotRegExp('/textarea name="data\[ScaffoldMock\]\[body\]" cols="30" rows="6" id="ScaffoldMockBody"/', $result); + $this->assertDoesNotMatchRegularExpression('/textarea name="data\[ScaffoldMock\]\[body\]" cols="30" rows="6" id="ScaffoldMockBody"/', $result); } /** diff --git a/lib/Cake/Test/Case/Error/ExceptionRendererTest.php b/lib/Cake/Test/Case/Error/ExceptionRendererTest.php index 5f21ff9c3..4dbcc8472 100644 --- a/lib/Cake/Test/Case/Error/ExceptionRendererTest.php +++ b/lib/Cake/Test/Case/Error/ExceptionRendererTest.php @@ -452,8 +452,8 @@ class ExceptionRendererTest extends CakeTestCase { $ExceptionRenderer->render(); $result = ob_get_clean(); - $this->assertNotRegExp('##', $result); + $this->assertDoesNotMatchRegularExpression('##', $result); } /** diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php index 18c8863d7..6796fc086 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php @@ -530,7 +530,7 @@ class PostgresTest extends CakeTestCase { )); $result = $this->Dbo->createSchema($schema); - $this->assertNotRegExp('/^CREATE INDEX(.+);,$/', $result); + $this->assertDoesNotMatchRegularExpression('/^CREATE INDEX(.+);,$/', $result); } /** @@ -566,7 +566,7 @@ class PostgresTest extends CakeTestCase { ); $result = $db1->createSchema($schema, 'datatype_tests'); - $this->assertNotRegExp('/timestamp DEFAULT/', $result); + $this->assertDoesNotMatchRegularExpression('/timestamp DEFAULT/', $result); $this->assertMatchesRegularExpression('/\"full_length\"\s*text\s.*,/', $result); $this->assertContains('timestamp ,', $result); $this->assertContains('"huge_int" bigint NOT NULL,', $result); @@ -709,7 +709,7 @@ class PostgresTest extends CakeTestCase { ) )); $result = $this->Dbo->alterSchema($New->compare($Old), 'alter_posts'); - $this->assertNotRegExp('/varchar\(36\) NOT NULL/i', $result); + $this->assertDoesNotMatchRegularExpression('/varchar\(36\) NOT NULL/i', $result); } /** diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php index 2aa12a70a..0ad014b3a 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php @@ -645,7 +645,7 @@ class SqlserverTest extends CakeTestCase { $this->db->update($this->model, $fields, null, $conditions); $result = $this->db->getLastQuery(); - $this->assertNotRegExp('/SqlserverTestModel/', $result); + $this->assertDoesNotMatchRegularExpression('/SqlserverTestModel/', $result); $this->assertMatchesRegularExpression('/^UPDATE \[sqlserver_test_models\]/', $result); $this->assertMatchesRegularExpression('/SET \[client_id\] = \[client_id\] \+ 1/', $result); } diff --git a/lib/Cake/Test/Case/Model/ModelReadTest.php b/lib/Cake/Test/Case/Model/ModelReadTest.php index 05f27cb8a..84bdaf1ec 100644 --- a/lib/Cake/Test/Case/Model/ModelReadTest.php +++ b/lib/Cake/Test/Case/Model/ModelReadTest.php @@ -7351,7 +7351,7 @@ class ModelReadTest extends BaseModelTest { $log = $this->db->getLog(); $this->assertTrue(isset($log['log'][0]['query'])); - $this->assertNotRegExp('/ORDER\s+BY/', $log['log'][0]['query']); + $this->assertDoesNotMatchRegularExpression('/ORDER\s+BY/', $log['log'][0]['query']); $Article = new Article(); $Article->order = null; diff --git a/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php b/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php index 528b435df..e4e841ac1 100644 --- a/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php +++ b/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php @@ -67,16 +67,16 @@ class CakeRouteTest extends CakeTestCase { $this->assertMatchesRegularExpression($result, '/posts/edit'); $this->assertMatchesRegularExpression($result, '/posts/super_delete'); - $this->assertNotRegExp($result, '/posts'); - $this->assertNotRegExp($result, '/posts/super_delete/1'); + $this->assertDoesNotMatchRegularExpression($result, '/posts'); + $this->assertDoesNotMatchRegularExpression($result, '/posts/super_delete/1'); $route = new CakeRoute('/posts/foo:id', array('controller' => 'posts', 'action' => 'view')); $result = $route->compile(); $this->assertMatchesRegularExpression($result, '/posts/foo:1'); $this->assertMatchesRegularExpression($result, '/posts/foo:param'); - $this->assertNotRegExp($result, '/posts'); - $this->assertNotRegExp($result, '/posts/'); + $this->assertDoesNotMatchRegularExpression($result, '/posts'); + $this->assertDoesNotMatchRegularExpression($result, '/posts/'); $this->assertEquals(array('id'), $route->keys); @@ -116,8 +116,8 @@ class CakeRouteTest extends CakeTestCase { $result = $route->compile(); $this->assertMatchesRegularExpression($result, '/posts/edit/1'); $this->assertMatchesRegularExpression($result, '/posts/view/518098'); - $this->assertNotRegExp($result, '/posts/edit/name-of-post'); - $this->assertNotRegExp($result, '/posts/edit/4/other:param'); + $this->assertDoesNotMatchRegularExpression($result, '/posts/edit/name-of-post'); + $this->assertDoesNotMatchRegularExpression($result, '/posts/edit/4/other:param'); $this->assertEquals(array('id', 'controller', 'action'), $route->keys); $route = new CakeRoute( @@ -128,8 +128,8 @@ class CakeRouteTest extends CakeTestCase { $result = $route->compile(); $this->assertMatchesRegularExpression($result, '/eng/posts/edit/1'); $this->assertMatchesRegularExpression($result, '/cze/articles/view/1'); - $this->assertNotRegExp($result, '/language/articles/view/2'); - $this->assertNotRegExp($result, '/eng/articles/view/name-of-article'); + $this->assertDoesNotMatchRegularExpression($result, '/language/articles/view/2'); + $this->assertDoesNotMatchRegularExpression($result, '/eng/articles/view/name-of-article'); $this->assertEquals(array('lang', 'id', 'controller', 'action'), $route->keys); foreach (array(':', '@', ';', '$', '-') as $delim) { @@ -138,8 +138,8 @@ class CakeRouteTest extends CakeTestCase { $this->assertMatchesRegularExpression($result, '/posts/1' . $delim . 'name-of-article'); $this->assertMatchesRegularExpression($result, '/posts/13244' . $delim . 'name-of_Article[]'); - $this->assertNotRegExp($result, '/posts/11!nameofarticle'); - $this->assertNotRegExp($result, '/posts/11'); + $this->assertDoesNotMatchRegularExpression($result, '/posts/11!nameofarticle'); + $this->assertDoesNotMatchRegularExpression($result, '/posts/11'); $this->assertEquals(array('title', 'id'), $route->keys); } @@ -152,9 +152,9 @@ class CakeRouteTest extends CakeTestCase { $result = $route->compile(); $this->assertMatchesRegularExpression($result, '/posts/1:name-of-article/2009/'); $this->assertMatchesRegularExpression($result, '/posts/13244:name-of-article/1999'); - $this->assertNotRegExp($result, '/posts/hey_now:nameofarticle'); - $this->assertNotRegExp($result, '/posts/:nameofarticle/2009'); - $this->assertNotRegExp($result, '/posts/:nameofarticle/01'); + $this->assertDoesNotMatchRegularExpression($result, '/posts/hey_now:nameofarticle'); + $this->assertDoesNotMatchRegularExpression($result, '/posts/:nameofarticle/2009'); + $this->assertDoesNotMatchRegularExpression($result, '/posts/:nameofarticle/01'); $this->assertEquals(array('year', 'title', 'id'), $route->keys); $route = new CakeRoute( @@ -165,9 +165,9 @@ class CakeRouteTest extends CakeTestCase { $result = $route->compile(); $this->assertMatchesRegularExpression($result, '/posts/some_title_for_article-(uuid:12534)/'); $this->assertMatchesRegularExpression($result, '/posts/some_title_for_article-(uuid:12534)'); - $this->assertNotRegExp($result, '/posts/'); - $this->assertNotRegExp($result, '/posts/nameofarticle'); - $this->assertNotRegExp($result, '/posts/nameofarticle-12347'); + $this->assertDoesNotMatchRegularExpression($result, '/posts/'); + $this->assertDoesNotMatchRegularExpression($result, '/posts/nameofarticle'); + $this->assertDoesNotMatchRegularExpression($result, '/posts/nameofarticle-12347'); $this->assertEquals(array('url_title', 'id'), $route->keys); } @@ -223,11 +223,11 @@ class CakeRouteTest extends CakeTestCase { $this->assertFalse($route->parse('/chaw_test/wiki')); $result = $route->compile(); - $this->assertNotRegExp($result, '/some_project/source'); + $this->assertDoesNotMatchRegularExpression($result, '/some_project/source'); $this->assertMatchesRegularExpression($result, '/source/view'); $this->assertMatchesRegularExpression($result, '/source/view/other/params'); - $this->assertNotRegExp($result, '/chaw_test/wiki'); - $this->assertNotRegExp($result, '/source/wierd_action'); + $this->assertDoesNotMatchRegularExpression($result, '/chaw_test/wiki'); + $this->assertDoesNotMatchRegularExpression($result, '/source/wierd_action'); } /** diff --git a/lib/Cake/Test/Case/Utility/DebuggerTest.php b/lib/Cake/Test/Case/Utility/DebuggerTest.php index 57e40f368..fd96c0e62 100644 --- a/lib/Cake/Test/Case/Utility/DebuggerTest.php +++ b/lib/Cake/Test/Case/Utility/DebuggerTest.php @@ -646,6 +646,6 @@ TEXT; $result = Debugger::trace(array( 'exclude' => array('DebuggerTest::testTraceExclude') )); - $this->assertNotRegExp('/^DebuggerTest::testTraceExclude/', $result); + $this->assertDoesNotMatchRegularExpression('/^DebuggerTest::testTraceExclude/', $result); } } diff --git a/lib/Cake/Test/Case/Utility/XmlTest.php b/lib/Cake/Test/Case/Utility/XmlTest.php index 48bf69089..8499888bb 100644 --- a/lib/Cake/Test/Case/Utility/XmlTest.php +++ b/lib/Cake/Test/Case/Utility/XmlTest.php @@ -164,7 +164,7 @@ class XmlTest extends CakeTestCase { $this->assertEquals('value', $obj->firstChild->nodeValue); $obj = Xml::build($xml, array('return' => 'domdocument', 'encoding' => null)); - $this->assertNotRegExp('/encoding/', $obj->saveXML()); + $this->assertDoesNotMatchRegularExpression('/encoding/', $obj->saveXML()); } /** diff --git a/lib/Cake/Test/Case/View/Helper/CacheHelperTest.php b/lib/Cake/Test/Case/View/Helper/CacheHelperTest.php index fa9fec6cf..1fffde514 100644 --- a/lib/Cake/Test/Case/View/Helper/CacheHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/CacheHelperTest.php @@ -118,8 +118,8 @@ class CacheHelperTest extends CakeTestCase { $View = new View($this->Controller); $result = $View->render('index'); - $this->assertNotRegExp('/cake:nocache/', $result); - $this->assertNotRegExp('/php echo/', $result); + $this->assertDoesNotMatchRegularExpression('/cake:nocache/', $result); + $this->assertDoesNotMatchRegularExpression('/php echo/', $result); $filename = CACHE . 'views' . DS . 'cachetest_cache_parsing.php'; $this->assertTrue(file_exists($filename)); @@ -177,8 +177,8 @@ class CacheHelperTest extends CakeTestCase { $View = new View($this->Controller); $result = $View->render('test_nocache_tags'); - $this->assertNotRegExp('/cake:nocache/', $result); - $this->assertNotRegExp('/php echo/', $result); + $this->assertDoesNotMatchRegularExpression('/cake:nocache/', $result); + $this->assertDoesNotMatchRegularExpression('/php echo/', $result); $filename = CACHE . 'views' . DS . 'cachetest_cache_parsing.php'; $this->assertTrue(file_exists($filename)); @@ -187,7 +187,7 @@ class CacheHelperTest extends CakeTestCase { $this->assertMatchesRegularExpression('/if \(is_writable\(TMP\)\)\:/', $contents); $this->assertMatchesRegularExpression('/php echo \$variable/', $contents); $this->assertMatchesRegularExpression('/php echo microtime()/', $contents); - $this->assertNotRegExp('/cake:nocache/', $contents); + $this->assertDoesNotMatchRegularExpression('/cake:nocache/', $contents); unlink($filename); } @@ -212,14 +212,14 @@ class CacheHelperTest extends CakeTestCase { $View = new View($this->Controller); $result = $View->render('multiple_nocache'); - $this->assertNotRegExp('/cake:nocache/', $result); - $this->assertNotRegExp('/php echo/', $result); + $this->assertDoesNotMatchRegularExpression('/cake:nocache/', $result); + $this->assertDoesNotMatchRegularExpression('/php echo/', $result); $filename = CACHE . 'views' . DS . 'cachetest_cache_parsing.php'; $this->assertTrue(file_exists($filename)); $contents = file_get_contents($filename); - $this->assertNotRegExp('/cake:nocache/', $contents); + $this->assertDoesNotMatchRegularExpression('/cake:nocache/', $contents); unlink($filename); } @@ -245,8 +245,8 @@ class CacheHelperTest extends CakeTestCase { $View = new View($this->Controller); $result = $View->render('sequencial_nocache'); - $this->assertNotRegExp('/cake:nocache/', $result); - $this->assertNotRegExp('/php echo/', $result); + $this->assertDoesNotMatchRegularExpression('/cake:nocache/', $result); + $this->assertDoesNotMatchRegularExpression('/php echo/', $result); $this->assertMatchesRegularExpression('/A\. Layout Before Content/', $result); $this->assertMatchesRegularExpression('/B\. In Plain Element/', $result); $this->assertMatchesRegularExpression('/C\. Layout After Test Element/', $result); @@ -254,13 +254,13 @@ class CacheHelperTest extends CakeTestCase { $this->assertMatchesRegularExpression('/E\. Layout After Content/', $result); $this->assertMatchesRegularExpression('/F\. In Element With No Cache Tags/', $result); $this->assertMatchesRegularExpression('/G\. Layout After Content And After Element With No Cache Tags/', $result); - $this->assertNotRegExp('/1\. layout before content/', $result); - $this->assertNotRegExp('/2\. in plain element/', $result); - $this->assertNotRegExp('/3\. layout after test element/', $result); - $this->assertNotRegExp('/4\. in view file/', $result); - $this->assertNotRegExp('/5\. layout after content/', $result); - $this->assertNotRegExp('/6\. in element with no cache tags/', $result); - $this->assertNotRegExp('/7\. layout after content and after element with no cache tags/', $result); + $this->assertDoesNotMatchRegularExpression('/1\. layout before content/', $result); + $this->assertDoesNotMatchRegularExpression('/2\. in plain element/', $result); + $this->assertDoesNotMatchRegularExpression('/3\. layout after test element/', $result); + $this->assertDoesNotMatchRegularExpression('/4\. in view file/', $result); + $this->assertDoesNotMatchRegularExpression('/5\. layout after content/', $result); + $this->assertDoesNotMatchRegularExpression('/6\. in element with no cache tags/', $result); + $this->assertDoesNotMatchRegularExpression('/7\. layout after content and after element with no cache tags/', $result); $filename = CACHE . 'views' . DS . 'cachetest_cache_complex.php'; $this->assertTrue(file_exists($filename)); @@ -268,14 +268,14 @@ class CacheHelperTest extends CakeTestCase { unlink($filename); $this->assertMatchesRegularExpression('/A\. Layout Before Content/', $contents); - $this->assertNotRegExp('/B\. In Plain Element/', $contents); + $this->assertDoesNotMatchRegularExpression('/B\. In Plain Element/', $contents); $this->assertMatchesRegularExpression('/C\. Layout After Test Element/', $contents); $this->assertMatchesRegularExpression('/D\. In View File/', $contents); $this->assertMatchesRegularExpression('/E\. Layout After Content/', $contents); $this->assertMatchesRegularExpression('/F\. In Element With No Cache Tags/', $contents); $this->assertMatchesRegularExpression('/G\. Layout After Content And After Element With No Cache Tags/', $contents); $this->assertMatchesRegularExpression('/1\. layout before content/', $contents); - $this->assertNotRegExp('/2\. in plain element/', $contents); + $this->assertDoesNotMatchRegularExpression('/2\. in plain element/', $contents); $this->assertMatchesRegularExpression('/3\. layout after test element/', $contents); $this->assertMatchesRegularExpression('/4\. in view file/', $contents); $this->assertMatchesRegularExpression('/5\. layout after content/', $contents); @@ -301,8 +301,8 @@ class CacheHelperTest extends CakeTestCase { $View = new View($this->Controller); $result = $View->render('index'); - $this->assertNotRegExp('/cake:nocache/', $result); - $this->assertNotRegExp('/php echo/', $result); + $this->assertDoesNotMatchRegularExpression('/cake:nocache/', $result); + $this->assertDoesNotMatchRegularExpression('/php echo/', $result); $filename = CACHE . 'views' . DS . 'cachetest_cache_parsing.php'; $this->assertTrue(file_exists($filename)); @@ -371,8 +371,8 @@ class CacheHelperTest extends CakeTestCase { $View = new View($this->Controller); $result = $View->render('index'); - $this->assertNotRegExp('/cake:nocache/', $result); - $this->assertNotRegExp('/php echo/', $result); + $this->assertDoesNotMatchRegularExpression('/cake:nocache/', $result); + $this->assertDoesNotMatchRegularExpression('/php echo/', $result); $filename = CACHE . 'views' . DS . 'cache_test_cache_parsing.php'; $this->assertTrue(file_exists($filename)); @@ -400,8 +400,8 @@ class CacheHelperTest extends CakeTestCase { $View = new View($this->Controller); $result = $View->render('index'); - $this->assertNotRegExp('/cake:nocache/', $result); - $this->assertNotRegExp('/php echo/', $result); + $this->assertDoesNotMatchRegularExpression('/cake:nocache/', $result); + $this->assertDoesNotMatchRegularExpression('/php echo/', $result); $filename = CACHE . 'views' . DS . 'cachetest_cache_parsing.php'; $this->assertTrue(file_exists($filename)); @@ -434,8 +434,8 @@ class CacheHelperTest extends CakeTestCase { $View = new View($this->Controller); $result = $View->render('index'); - $this->assertNotRegExp('/cake:nocache/', $result); - $this->assertNotRegExp('/php echo/', $result); + $this->assertDoesNotMatchRegularExpression('/cake:nocache/', $result); + $this->assertDoesNotMatchRegularExpression('/php echo/', $result); $filename = CACHE . 'views' . DS . 'cache_test_cache_parsing_1_2_name_mark_ice_cream.php'; $this->assertTrue(file_exists($filename)); @@ -466,8 +466,8 @@ class CacheHelperTest extends CakeTestCase { $View = new View($this->Controller); $result = $View->render('index'); - $this->assertNotRegExp('/cake:nocache/', $result); - $this->assertNotRegExp('/php echo/', $result); + $this->assertDoesNotMatchRegularExpression('/cake:nocache/', $result); + $this->assertDoesNotMatchRegularExpression('/php echo/', $result); $filename = CACHE . 'views' . DS . 'cache_test_cache_parsing_q_cakephp.php'; $this->assertTrue(file_exists($filename), 'Missing cache file ' . $filename); @@ -500,8 +500,8 @@ class CacheHelperTest extends CakeTestCase { $View = new View($this->Controller); $result = $View->render('index'); - $this->assertNotRegExp('/cake:nocache/', $result); - $this->assertNotRegExp('/php echo/', $result); + $this->assertDoesNotMatchRegularExpression('/cake:nocache/', $result); + $this->assertDoesNotMatchRegularExpression('/php echo/', $result); $filename = CACHE . 'views' . DS . 'en_cache_test_cache_parsing.php'; $this->assertTrue(file_exists($filename)); @@ -535,8 +535,8 @@ class CacheHelperTest extends CakeTestCase { $View = new View($this->Controller); $result = $View->render('index'); - $this->assertNotRegExp('/cake:nocache/', $result); - $this->assertNotRegExp('/php echo/', $result); + $this->assertDoesNotMatchRegularExpression('/cake:nocache/', $result); + $this->assertDoesNotMatchRegularExpression('/php echo/', $result); $filename = CACHE . 'views' . DS . 'cache_cachetest_cache_name.php'; $this->assertTrue(file_exists($filename)); @@ -620,8 +620,8 @@ class CacheHelperTest extends CakeTestCase { $View = new View($this->Controller); $result = $View->render('cache_empty_sections'); - $this->assertNotRegExp('/nocache/', $result); - $this->assertNotRegExp('/php echo/', $result); + $this->assertDoesNotMatchRegularExpression('/nocache/', $result); + $this->assertDoesNotMatchRegularExpression('/php echo/', $result); $this->assertMatchesRegularExpression( '@\s*\s*' . '\s*' . @@ -632,7 +632,7 @@ class CacheHelperTest extends CakeTestCase { $filename = CACHE . 'views' . DS . 'cachetest_cache_empty_sections.php'; $this->assertTrue(file_exists($filename)); $contents = file_get_contents($filename); - $this->assertNotRegExp('/nocache/', $contents); + $this->assertDoesNotMatchRegularExpression('/nocache/', $contents); $this->assertMatchesRegularExpression( '@\s*Posts\s*' . '<\?php \$x \= 1; \?>\s*' . diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index ab4b0dd4f..972ea65d1 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -2909,27 +2909,27 @@ class FormHelperTest extends CakeTestCase { $result = $this->Form->input('Contact.created', array('type' => 'time', 'timeFormat' => 24)); $result = explode(':', $result); $this->assertMatchesRegularExpression('/option value="23"/', $result[0]); - $this->assertNotRegExp('/option value="24"/', $result[0]); + $this->assertDoesNotMatchRegularExpression('/option value="24"/', $result[0]); $result = $this->Form->input('Contact.created', array('type' => 'time', 'timeFormat' => 24)); $result = explode(':', $result); $this->assertMatchesRegularExpression('/option value="23"/', $result[0]); - $this->assertNotRegExp('/option value="24"/', $result[0]); + $this->assertDoesNotMatchRegularExpression('/option value="24"/', $result[0]); $result = $this->Form->input('Model.field', array( 'type' => 'time', 'timeFormat' => 24, 'interval' => 15 )); $result = explode(':', $result); - $this->assertNotRegExp('##', $result[1]); - $this->assertNotRegExp('##', $result[1]); + $this->assertDoesNotMatchRegularExpression('##', $result[1]); + $this->assertDoesNotMatchRegularExpression('##', $result[1]); $this->assertMatchesRegularExpression('##', $result[1]); $result = $this->Form->input('Model.field', array( 'type' => 'time', 'timeFormat' => 12, 'interval' => 15 )); $result = explode(':', $result); - $this->assertNotRegExp('##', $result[1]); - $this->assertNotRegExp('##', $result[1]); + $this->assertDoesNotMatchRegularExpression('##', $result[1]); + $this->assertDoesNotMatchRegularExpression('##', $result[1]); $this->assertMatchesRegularExpression('##', $result[1]); $result = $this->Form->input('prueba', array( @@ -2937,8 +2937,8 @@ class FormHelperTest extends CakeTestCase { 'maxYear' => date('Y') + 1, 'interval' => 15 )); $result = explode(':', $result); - $this->assertNotRegExp('##', $result[1]); - $this->assertNotRegExp('##', $result[1]); + $this->assertDoesNotMatchRegularExpression('##', $result[1]); + $this->assertDoesNotMatchRegularExpression('##', $result[1]); $this->assertMatchesRegularExpression('##', $result[1]); $this->assertMatchesRegularExpression('##', $result[1]); @@ -3213,8 +3213,8 @@ class FormHelperTest extends CakeTestCase { 'maxYear' => date('Y') + 1, 'interval' => 15 )); $result = explode(':', $result); - $this->assertNotRegExp('##', $result[1]); - $this->assertNotRegExp('##', $result[1]); + $this->assertDoesNotMatchRegularExpression('##', $result[1]); + $this->assertDoesNotMatchRegularExpression('##', $result[1]); $this->assertMatchesRegularExpression('##', $result[1]); $this->assertMatchesRegularExpression('##', $result[1]); @@ -3240,7 +3240,7 @@ class FormHelperTest extends CakeTestCase { $result = explode('assertMatchesRegularExpression('/option value="23"/', $result[0]); - $this->assertNotRegExp('/option value="24"/', $result[0]); + $this->assertDoesNotMatchRegularExpression('/option value="24"/', $result[0]); $result = $this->Form->input('Model.field', array( 'type' => 'datetime', 'timeFormat' => 12 @@ -3248,7 +3248,7 @@ class FormHelperTest extends CakeTestCase { $result = explode('assertMatchesRegularExpression('/option value="12"/', $result[0]); - $this->assertNotRegExp('/option value="13"/', $result[0]); + $this->assertDoesNotMatchRegularExpression('/option value="13"/', $result[0]); $this->Form->request->data = array('Contact' => array('created' => null)); $result = $this->Form->input('Contact.created', array('empty' => 'Date Unknown')); @@ -6976,15 +6976,15 @@ class FormHelperTest extends CakeTestCase { '*/select' ); $this->assertTags($result, $expected); - $this->assertNotRegExp('/]+value=""[^<>]+selected="selected"[^>]*>/', $result); + $this->assertDoesNotMatchRegularExpression('/]+value=""[^<>]+selected="selected"[^>]*>/', $result); $result = $this->Form->dateTime('Contact.date', 'DMY', '12', array('value' => false)); $this->assertTags($result, $expected); - $this->assertNotRegExp('/]+value=""[^<>]+selected="selected"[^>]*>/', $result); + $this->assertDoesNotMatchRegularExpression('/]+value=""[^<>]+selected="selected"[^>]*>/', $result); $result = $this->Form->dateTime('Contact.date', 'DMY', '12', array('value' => '')); $this->assertTags($result, $expected); - $this->assertNotRegExp('/]+value=""[^<>]+selected="selected"[^>]*>/', $result); + $this->assertDoesNotMatchRegularExpression('/]+value=""[^<>]+selected="selected"[^>]*>/', $result); $result = $this->Form->dateTime('Contact.date', 'DMY', '12', array('interval' => 5, 'value' => '')); $expected = array( @@ -7033,7 +7033,7 @@ class FormHelperTest extends CakeTestCase { '*/select' ); $this->assertTags($result, $expected); - $this->assertNotRegExp('/]+value=""[^<>]+selected="selected"[^>]*>/', $result); + $this->assertDoesNotMatchRegularExpression('/]+value=""[^<>]+selected="selected"[^>]*>/', $result); $result = $this->Form->dateTime('Contact.date', 'DMY', '12', array('minuteInterval' => 5, 'value' => '')); $result = $this->Form->dateTime('Contact.date', 'DMY', '12', array('minuteInterval' => 5, 'value' => '')); @@ -7077,7 +7077,7 @@ class FormHelperTest extends CakeTestCase { '*/select' ); $this->assertTags($result, $expected); - $this->assertNotRegExp('/]+value=""[^<>]+selected="selected"[^>]*>/', $result); + $this->assertDoesNotMatchRegularExpression('/]+value=""[^<>]+selected="selected"[^>]*>/', $result); $this->Form->request->data['Model']['field'] = date('Y') . '-01-01 00:00:00'; $now = strtotime($this->Form->data['Model']['field']); @@ -7316,7 +7316,7 @@ class FormHelperTest extends CakeTestCase { */ public function testDateTimeWithBogusData() { $result = $this->Form->dateTime('Contact.updated', 'DMY', '12', array('value' => 'CURRENT_TIMESTAMP')); - $this->assertNotRegExp('/selected="selected">\d/', $result); + $this->assertDoesNotMatchRegularExpression('/selected="selected">\d/', $result); } /** @@ -7335,7 +7335,7 @@ class FormHelperTest extends CakeTestCase { ); $this->assertMatchesRegularExpression('/