Browse Source

Fix deprecated method use in TestSuite

Mark Story 8 years ago
parent
commit
9dca3d2dac
1 changed files with 11 additions and 11 deletions
  1. 11 11
      tests/TestCase/TestSuite/TestCaseTest.php

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

@@ -403,21 +403,21 @@ class TestCaseTest extends TestCase
 
         $this->assertInstanceOf('TestApp\Model\Table\PostsTable', $Posts);
         $this->assertNull($Posts->save($entity));
-        $this->assertNull($Posts->table());
+        $this->assertNull($Posts->getTable());
 
         $Posts = $this->getMockForModel('Posts', ['save']);
         $Posts->expects($this->at(0))
             ->method('save')
             ->will($this->returnValue('mocked'));
         $this->assertEquals('mocked', $Posts->save($entity));
-        $this->assertEquals('\Cake\ORM\Entity', $Posts->entityClass());
+        $this->assertEquals('\Cake\ORM\Entity', $Posts->getEntityClass());
 
         $Posts = $this->getMockForModel('Posts', ['doSomething']);
-        $this->assertInstanceOf('Cake\Database\Connection', $Posts->connection());
-        $this->assertEquals('test', $Posts->connection()->configName());
+        $this->assertInstanceOf('Cake\Database\Connection', $Posts->getConnection());
+        $this->assertEquals('test', $Posts->getConnection()->configName());
 
         $Tags = $this->getMockForModel('Tags', ['doSomething']);
-        $this->assertEquals('TestApp\Model\Entity\Tag', $Tags->entityClass());
+        $this->assertEquals('TestApp\Model\Entity\Tag', $Tags->getEntityClass());
     }
 
     /**
@@ -430,7 +430,7 @@ class TestCaseTest extends TestCase
         ConnectionManager::alias('test', 'secondary');
 
         $post = $this->getMockForModel(__NAMESPACE__ . '\SecondaryPostsTable', ['save']);
-        $this->assertEquals('test', $post->connection()->configName());
+        $this->assertEquals('test', $post->getConnection()->configName());
     }
 
     /**
@@ -451,7 +451,7 @@ class TestCaseTest extends TestCase
         $TestPluginComment = $this->getMockForModel('TestPlugin.TestPluginComments', ['save']);
 
         $this->assertInstanceOf('TestPlugin\Model\Table\TestPluginCommentsTable', $TestPluginComment);
-        $this->assertEquals('\Cake\ORM\Entity', $TestPluginComment->entityClass());
+        $this->assertEquals('\Cake\ORM\Entity', $TestPluginComment->getEntityClass());
         $TestPluginComment->expects($this->at(0))
             ->method('save')
             ->will($this->returnValue(true));
@@ -465,7 +465,7 @@ class TestCaseTest extends TestCase
 
         $TestPluginAuthors = $this->getMockForModel('TestPlugin.Authors', ['doSomething']);
         $this->assertInstanceOf('TestPlugin\Model\Table\AuthorsTable', $TestPluginAuthors);
-        $this->assertEquals('TestPlugin\Model\Entity\Author', $TestPluginAuthors->entityClass());
+        $this->assertEquals('TestPlugin\Model\Entity\Author', $TestPluginAuthors->getEntityClass());
     }
 
     /**
@@ -483,7 +483,7 @@ class TestCaseTest extends TestCase
 
         $result = TableRegistry::get('Comments');
         $this->assertInstanceOf('Cake\ORM\Table', $result);
-        $this->assertEquals('Comments', $Mock->alias());
+        $this->assertEquals('Comments', $Mock->getAlias());
 
         $Mock->expects($this->at(0))
             ->method('save')
@@ -507,9 +507,9 @@ class TestCaseTest extends TestCase
         static::setAppNamespace();
 
         $I18n = $this->getMockForModel('I18n', ['doSomething']);
-        $this->assertEquals('custom_i18n_table', $I18n->table());
+        $this->assertEquals('custom_i18n_table', $I18n->getTable());
 
         $Tags = $this->getMockForModel('Tags', ['doSomething']);
-        $this->assertEquals('tags', $Tags->table());
+        $this->assertEquals('tags', $Tags->getTable());
     }
 }