Browse Source

Deprecate old and 100% redundant comp. wrappers.

euromark 12 years ago
parent
commit
196e5ae650

+ 6 - 6
Cake/Test/TestCase/Database/Type/DateTimeTypeTest.php

@@ -46,12 +46,12 @@ class DateTimeTypeTest extends TestCase {
 
 		$result = $this->type->toPHP('2001-01-04 12:13:14', $this->driver);
 		$this->assertInstanceOf('DateTime', $result);
-		$this->assertEqual('2001', $result->format('Y'));
-		$this->assertEqual('01', $result->format('m'));
-		$this->assertEqual('04', $result->format('d'));
-		$this->assertEqual('12', $result->format('H'));
-		$this->assertEqual('13', $result->format('i'));
-		$this->assertEqual('14', $result->format('s'));
+		$this->assertEquals('2001', $result->format('Y'));
+		$this->assertEquals('01', $result->format('m'));
+		$this->assertEquals('04', $result->format('d'));
+		$this->assertEquals('12', $result->format('H'));
+		$this->assertEquals('13', $result->format('i'));
+		$this->assertEquals('14', $result->format('s'));
 	}
 
 /**

+ 3 - 3
Cake/Test/TestCase/Database/Type/DateTypeTest.php

@@ -46,9 +46,9 @@ class DateTypeTest extends TestCase {
 
 		$result = $this->type->toPHP('2001-01-04', $this->driver);
 		$this->assertInstanceOf('DateTime', $result);
-		$this->assertEqual('2001', $result->format('Y'));
-		$this->assertEqual('01', $result->format('m'));
-		$this->assertEqual('04', $result->format('d'));
+		$this->assertEquals('2001', $result->format('Y'));
+		$this->assertEquals('01', $result->format('m'));
+		$this->assertEquals('04', $result->format('d'));
 
 		$result = $this->type->toPHP('2001-01-04 10:11:12', $this->driver);
 		$this->assertFalse($result);

+ 1 - 1
Cake/Test/TestCase/Model/ModelCrossSchemaHabtmTest.php

@@ -149,7 +149,7 @@ class ModelCrossSchemaHabtmTest extends ModelTestBase {
 		));
 
 		$results = $Player->saveAll($player, array('validate' => 'first'));
-		$this->assertNotEqual(false, $results);
+		$this->assertNotSame(false, $results);
 		$count = $Player->find('count');
 		$this->assertEquals(5, $count);
 

+ 1 - 1
Cake/Test/TestCase/View/Helper/FormHelperTest.php

@@ -9275,7 +9275,7 @@ class FormHelperTest extends TestCase {
 			'div' => false,
 			'label' => false,
 		);
-		$this->assertEqual($result, $expected);
+		$this->assertEquals($expected, $result);
 	}
 
 }

+ 1 - 1
Cake/Test/TestCase/View/Helper/PaginatorHelperTest.php

@@ -2027,7 +2027,7 @@ class PaginatorHelperTest extends TestCase {
  */
 	public function testParam() {
 		$result = $this->Paginator->param('count');
-		$this->assertIdentical(62, $result);
+		$this->assertSame(62, $result);
 
 		$result = $this->Paginator->param('imaginary');
 		$this->assertNull($result);

+ 1 - 1
Cake/Test/TestCase/View/ViewTest.php

@@ -1349,7 +1349,7 @@ class ViewTest extends TestCase {
 	public function testBlockSetDecimal() {
 		$this->View->assign('testWithDecimal', 1.23456789);
 		$result = $this->View->fetch('testWithDecimal');
-		$this->assertEqual('1.23456789', $result);
+		$this->assertEquals('1.23456789', $result);
 	}
 
 /**

+ 2 - 98
Cake/TestSuite/TestCase.php

@@ -525,79 +525,6 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
 // @codingStandardsIgnoreStart
 
 /**
- * Compatibility wrapper function for assertEquals
- *
- *
- * @param mixed $result
- * @param mixed $expected
- * @param string $message the text to display if the assertion is not correct
- * @return void
- */
-	protected static function assertEqual($result, $expected, $message = '') {
-		return static::assertEquals($expected, $result, $message);
-	}
-
-/**
- * Compatibility wrapper function for assertNotEquals
- *
- * @param mixed $result
- * @param mixed $expected
- * @param string $message the text to display if the assertion is not correct
- * @return void
- */
-	protected static function assertNotEqual($result, $expected, $message = '') {
-		return static::assertNotEquals($expected, $result, $message);
-	}
-
-/**
- * Compatibility wrapper function for assertRegexp
- *
- * @param mixed $pattern a regular expression
- * @param string $string the text to be matched
- * @param string $message the text to display if the assertion is not correct
- * @return void
- */
-	protected static function assertPattern($pattern, $string, $message = '') {
-		return static::assertRegExp($pattern, $string, $message);
-	}
-
-/**
- * Compatibility wrapper function for assertEquals
- *
- * @param mixed $actual
- * @param mixed $expected
- * @param string $message the text to display if the assertion is not correct
- * @return void
- */
-	protected static function assertIdentical($actual, $expected, $message = '') {
-		return static::assertSame($expected, $actual, $message);
-	}
-
-/**
- * Compatibility wrapper function for assertNotEquals
- *
- * @param mixed $actual
- * @param mixed $expected
- * @param string $message the text to display if the assertion is not correct
- * @return void
- */
-	protected static function assertNotIdentical($actual, $expected, $message = '') {
-		return static::assertNotSame($expected, $actual, $message);
-	}
-
-/**
- * Compatibility wrapper function for assertNotRegExp
- *
- * @param mixed $pattern a regular expression
- * @param string $string the text to be matched
- * @param string $message the text to display if the assertion is not correct
- * @return void
- */
-	protected static function assertNoPattern($pattern, $string, $message = '') {
-		return static::assertNotRegExp($pattern, $string, $message);
-	}
-
-/**
  * assert no errors
  */
 	protected function assertNoErrors() {
@@ -629,30 +556,6 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
 	}
 
 /**
- * Compatibility wrapper function for assertSame
- *
- * @param mixed $first
- * @param mixed $second
- * @param string $message the text to display if the assertion is not correct
- * @return void
- */
-	protected static function assertReference(&$first, &$second, $message = '') {
-		return static::assertSame($first, $second, $message);
-	}
-
-/**
- * Compatibility wrapper for assertIsA
- *
- * @param string $object
- * @param string $type
- * @param string $message
- * @return void
- */
-	protected static function assertIsA($object, $type, $message = '') {
-		return static::assertInstanceOf($type, $object, $message);
-	}
-
-/**
  * Compatibility function to test if value is between an acceptable range
  *
  * @param mixed $result
@@ -680,7 +583,8 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
 		}
 		return $condition;
 	}
-	// @codingStandardsIgnoreEnd
+
+// @codingStandardsIgnoreEnd
 
 /**
  * Mock a model, maintain fixtures and table association