Browse Source

Remove deprecations

Mark Scherer 10 years ago
parent
commit
442ced0696

+ 1 - 1
Test/Case/Lib/GeocodeLibTest.php

@@ -275,7 +275,7 @@ class GeocodeLibTest extends MyCakeTestCase {
 		$Method->setAccessible(true);
 
 		$is = $Method->invoke($this->Geocode);
-		$this->assertPattern('#https://maps.google.com/maps/api/geocode/json#', $is);
+		$this->assertRegExp('#https://maps.google.com/maps/api/geocode/json#', $is);
 	}
 
 	/**

+ 1 - 1
Test/Case/Model/Behavior/KeyValueBehaviorTest.php

@@ -62,7 +62,7 @@ class KeyValueBehaviorTest extends MyCakeTestCase {
 		$this->assertTrue(!empty($res['Profile']));
 
 		$res = $this->Model->getSection(2, 'Profile');
-		$this->assertIdentical(['x' => '3', 'y' => 'abc'], $res);
+		$this->assertSame(['x' => '3', 'y' => 'abc'], $res);
 	}
 
 	public function testDefaults() {

+ 2 - 2
Test/Case/Model/MyModelTest.php

@@ -300,12 +300,12 @@ class MyModelTest extends MyCakeTestCase {
 		$result = $this->User->deleteAllRaw(['user !=' => 'foo', 'created <' => date(FORMAT_DB_DATE), 'id >' => 1]);
 		$this->assertTrue($result);
 		$result = $this->User->getAffectedRows();
-		$this->assertIdentical(3, $result);
+		$this->assertSame(3, $result);
 
 		$result = $this->User->deleteAllRaw();
 		$this->assertTrue($result);
 		$result = $this->User->getAffectedRows();
-		$this->assertIdentical(1, $result);
+		$this->assertSame(1, $result);
 	}
 
 	/**

+ 4 - 4
Test/Case/View/Helper/MyHelperUrlCacheTest.php

@@ -32,7 +32,7 @@ class MyHelperUrlCacheTest extends CakeTestCase {
 	}
 
 	public function testInstance() {
-		$this->assertTrue(is_a($this->HtmlHelper, 'MyHelper'));
+		$this->assertInstanceOf('MyHelper', $this->HtmlHelper);
 	}
 
 	public function testSettings() {
@@ -52,14 +52,14 @@ class MyHelperUrlCacheTest extends CakeTestCase {
 
 	public function testUrlFull() {
 		$url = $this->HtmlHelper->url(['controller' => 'posts'], true);
-		$this->assertPattern('/http:\/\/(.*)\/posts/', $url);
+		$this->assertRegExp('/http:\/\/(.*)\/posts/', $url);
 		$this->assertEquals(['8f45f5c31d138d700742b01ccb673e1e'], array_keys(UrlCacheManager::$cache));
-		$this->assertPattern('/http:\/\/(.*)\/posts/', UrlCacheManager::$cache['8f45f5c31d138d700742b01ccb673e1e']);
+		$this->assertRegExp('/http:\/\/(.*)\/posts/', UrlCacheManager::$cache['8f45f5c31d138d700742b01ccb673e1e']);
 
 		$this->HtmlHelper->afterLayout('foo');
 		$cache = Cache::read(UrlCacheManager::$cacheKey, '_cake_core_');
 		$this->assertEquals(['8f45f5c31d138d700742b01ccb673e1e'], array_keys($cache));
-		$this->assertPattern('/http:\/\/(.*)\/posts/', $cache['8f45f5c31d138d700742b01ccb673e1e']);
+		$this->assertRegExp('/http:\/\/(.*)\/posts/', $cache['8f45f5c31d138d700742b01ccb673e1e']);
 	}
 
 	public function testUrlRelativeAndFull() {