Browse Source

Rename remaining tests

euromark 11 years ago
parent
commit
ddcb3ce3a6
2 changed files with 33 additions and 33 deletions
  1. 18 18
      tests/Fixture/AssertTagsTestCase.php
  2. 15 15
      tests/TestCase/TestSuite/TestCaseTest.php

+ 18 - 18
tests/Fixture/AssertTagsTestCase.php

@@ -4,24 +4,24 @@ namespace Cake\Test\Fixture;
 use Cake\TestSuite\TestCase;
 
 /**
- * This class helps in indirectly testing the functionalities of CakeTestCase::assertTags
+ * This class helps in indirectly testing the functionalities of CakeTestCase::assertHtml
  *
  */
-class AssertTagsTestCase extends TestCase {
+class AssertHtmlTestCase extends TestCase {
 
 /**
- * test that assertTags knows how to handle correct quoting.
+ * test that assertHtml knows how to handle correct quoting.
  *
  * @return void
  */
-	public function testAssertTagsQuotes() {
+	public function testAssertHtmlQuotes() {
 		$input = '<a href="/test.html" class="active">My link</a>';
 		$pattern = array(
 			'a' => array('href' => '/test.html', 'class' => 'active'),
 			'My link',
 			'/a'
 		);
-		$this->assertTags($input, $pattern);
+		$this->assertHtml($pattern, $input);
 
 		$input = "<a href='/test.html' class='active'>My link</a>";
 		$pattern = array(
@@ -29,7 +29,7 @@ class AssertTagsTestCase extends TestCase {
 			'My link',
 			'/a'
 		);
-		$this->assertTags($input, $pattern);
+		$this->assertHtml($pattern, $input);
 
 		$input = "<a href='/test.html' class='active'>My link</a>";
 		$pattern = array(
@@ -37,15 +37,15 @@ class AssertTagsTestCase extends TestCase {
 			'My link',
 			'/a'
 		);
-		$this->assertTags($input, $pattern);
+		$this->assertHtml($pattern, $input);
 	}
 
 /**
- * testNumericValuesInExpectationForAssertTags
+ * testNumericValuesInExpectationForAssertHtml
  *
  * @return void
  */
-	public function testNumericValuesInExpectationForAssertTags() {
+	public function testNumericValuesInExpectationForAssertHtml() {
 		$value = 220985;
 
 		$input = '<p><strong>' . $value . '</strong></p>';
@@ -56,7 +56,7 @@ class AssertTagsTestCase extends TestCase {
 				'/strong',
 			'/p'
 		);
-		$this->assertTags($input, $pattern);
+		$this->assertHtml($pattern, $input);
 
 		$input = '<p><strong>' . $value . '</strong></p><p><strong>' . $value . '</strong></p>';
 		$pattern = array(
@@ -71,7 +71,7 @@ class AssertTagsTestCase extends TestCase {
 				'/strong',
 			'/p',
 		);
-		$this->assertTags($input, $pattern);
+		$this->assertHtml($pattern, $input);
 
 		$input = '<p><strong>' . $value . '</strong></p><p id="' . $value . '"><strong>' . $value . '</strong></p>';
 		$pattern = array(
@@ -86,37 +86,37 @@ class AssertTagsTestCase extends TestCase {
 				'/strong',
 			'/p',
 		);
-		$this->assertTags($input, $pattern);
+		$this->assertHtml($pattern, $input);
 	}
 
 /**
- * testBadAssertTags
+ * testBadAssertHtml
  *
  * @return void
  */
-	public function testBadAssertTags() {
+	public function testBadAssertHtml() {
 		$input = '<a href="/test.html" class="active">My link</a>';
 		$pattern = array(
 			'a' => array('hRef' => '/test.html', 'clAss' => 'active'),
 			'My link2',
 			'/a'
 		);
-		$this->assertTags($input, $pattern);
+		$this->assertHtml($pattern, $input);
 	}
 
 /**
- * testBadAssertTags
+ * testBadAssertHtml
  *
  * @return void
  */
-	public function testBadAssertTags2() {
+	public function testBadAssertHtml2() {
 		$input = '<a href="/test.html" class="active">My link</a>';
 		$pattern = array(
 			'<a' => array('href' => '/test.html', 'class' => 'active'),
 			'My link',
 			'/a'
 		);
-		$this->assertTags($input, $pattern);
+		$this->assertHtml($pattern, $input);
 	}
 
 }

+ 15 - 15
tests/TestCase/TestSuite/TestCaseTest.php

@@ -20,7 +20,7 @@ use Cake\Core\Configure;
 use Cake\Core\Plugin;
 use Cake\ORM\TableRegistry;
 use Cake\TestSuite\TestCase;
-use Cake\Test\Fixture\AssertTagsTestCase;
+use Cake\Test\Fixture\AssertHtmlTestCase;
 use Cake\Test\Fixture\FixturizedTestCase;
 
 /**
@@ -30,12 +30,12 @@ use Cake\Test\Fixture\FixturizedTestCase;
 class TestCaseTest extends TestCase {
 
 /**
- * testAssertTags
+ * testAssertHtml
  *
  * @return void
  */
-	public function testAssertTagsBasic() {
-		$test = new AssertTagsTestCase('testAssertTagsQuotes');
+	public function testAssertHtmlBasic() {
+		$test = new AssertHtmlTestCase('testAssertHtmlQuotes');
 		$result = $test->run();
 		$this->assertEquals(0, $result->errorCount());
 		$this->assertTrue($result->wasSuccessful());
@@ -43,11 +43,11 @@ class TestCaseTest extends TestCase {
 	}
 
 /**
- * test assertTags works with single and double quotes
+ * test assertHtml works with single and double quotes
  *
  * @return void
  */
-	public function testAssertTagsQuoting() {
+	public function testAssertHtmlQuoting() {
 		$input = '<a href="/test.html" class="active">My link</a>';
 		$pattern = array(
 			'a' => array('href' => '/test.html', 'class' => 'active'),
@@ -94,11 +94,11 @@ class TestCaseTest extends TestCase {
 	}
 
 /**
- * Test that assertTags runs quickly.
+ * Test that assertHtml runs quickly.
  *
  * @return void
  */
-	public function testAssertTagsRuntimeComplexity() {
+	public function testAssertHtmlRuntimeComplexity() {
 		$pattern = array(
 			'div' => array(
 				'attr1' => 'val1',
@@ -121,12 +121,12 @@ class TestCaseTest extends TestCase {
 	}
 
 /**
- * testNumericValuesInExpectationForAssertTags
+ * testNumericValuesInExpectationForAssertHtml
  *
  * @return void
  */
-	public function testNumericValuesInExpectationForAssertTags() {
-		$test = new AssertTagsTestCase('testNumericValuesInExpectationForAssertTags');
+	public function testNumericValuesInExpectationForAssertHtml() {
+		$test = new AssertHtmlTestCase('testNumericValuesInExpectationForAssertHtml');
 		$result = $test->run();
 		$this->assertEquals(0, $result->errorCount());
 		$this->assertTrue($result->wasSuccessful());
@@ -134,18 +134,18 @@ class TestCaseTest extends TestCase {
 	}
 
 /**
- * testBadAssertTags
+ * testBadAssertHtml
  *
  * @return void
  */
-	public function testBadAssertTags() {
-		$test = new AssertTagsTestCase('testBadAssertTags');
+	public function testBadAssertHtml() {
+		$test = new AssertHtmlTestCase('testBadAssertHtml');
 		$result = $test->run();
 		$this->assertEquals(0, $result->errorCount());
 		$this->assertFalse($result->wasSuccessful());
 		$this->assertEquals(1, $result->failureCount());
 
-		$test = new AssertTagsTestCase('testBadAssertTags2');
+		$test = new AssertHtmlTestCase('testBadAssertHtml2');
 		$result = $test->run();
 		$this->assertEquals(0, $result->errorCount());
 		$this->assertFalse($result->wasSuccessful());