diff --git a/composer.json b/composer.json index 558907ac2..4c29549a1 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ }, "require": { "php": ">=5.6.0", - "cakephp/cakephp": "^3.6.12", + "cakephp/cakephp": "^3.7.0", "cakephp/plugin-installer": "^1.0", "wyrihaximus/twig-view": "^4.3.4" }, diff --git a/src/Shell/BakeShell.php b/src/Shell/BakeShell.php index d6aeb337d..0fb25b64c 100644 --- a/src/Shell/BakeShell.php +++ b/src/Shell/BakeShell.php @@ -57,7 +57,7 @@ public function startup() Configure::write('debug', true); Cache::disable(); // Loading WyriHaximus/TwigView Plugin through the Plugin::load() for backward compatibility. - if (!Plugin::loaded('WyriHaximus/TwigView')) { + if (!Plugin::isLoaded('WyriHaximus/TwigView')) { Plugin::load('WyriHaximus/TwigView', ['bootstrap' => true]); } diff --git a/src/Shell/Task/ModelTask.php b/src/Shell/Task/ModelTask.php index 4a48d3201..ca74e6baa 100644 --- a/src/Shell/Task/ModelTask.php +++ b/src/Shell/Task/ModelTask.php @@ -291,7 +291,7 @@ public function getAssociationInfo(Table $table) if ($tableClass === 'Cake\ORM\Table') { $namespace = $appNamespace; - $className = $association->className(); + $className = $association->getClassName(); if (strlen($className)) { list($plugin, $className) = pluginSplit($className); if ($plugin !== null) { diff --git a/src/Shell/Task/TestTask.php b/src/Shell/Task/TestTask.php index a84c75f18..4d3009ebe 100644 --- a/src/Shell/Task/TestTask.php +++ b/src/Shell/Task/TestTask.php @@ -487,7 +487,7 @@ protected function _processController($subject) protected function _addFixture($name) { if ($this->plugin) { - $prefix = 'plugin.' . Inflector::underscore($this->plugin) . '.'; + $prefix = 'plugin.' . $this->plugin . '.'; } else { $prefix = 'app.'; } diff --git a/src/Template/Bake/tests/test_case.twig b/src/Template/Bake/tests/test_case.twig index d652502df..859a5c216 100644 --- a/src/Template/Bake/tests/test_case.twig +++ b/src/Template/Bake/tests/test_case.twig @@ -19,13 +19,14 @@ {% set isShell = type|lower == 'shell' %} {% set isCommand = type|lower == 'command' %} {% if isController %} - {%- set superClassName = 'IntegrationTestCase' %} + {%- set traitName = 'IntegrationTestTrait' %} {% elseif isShell or isCommand %} - {%- set superClassName = 'ConsoleIntegrationTestCase' %} -{% else %} - {%- set superClassName = 'TestCase' %} + {%- set traitName = 'ConsoleIntegrationTestTrait' %} +{% endif %} +{%- set uses = uses|merge(["Cake\\TestSuite\\TestCase"]) %} +{% if traitName %} + {%- set uses = uses|merge(["Cake\\TestSuite\\#{traitName}"]) %} {% endif %} -{%- set uses = uses|merge(["Cake\\TestSuite\\#{superClassName}"]) %} {%- set uses = uses|sort %} _currentType = static::TYPE_TEMPLATE; $this->dispatchEvent('View.beforeRender', [$viewFileName]); - $this->dispatchEvent('View.beforeRender.' . $templateEventName, [$viewFileName]); + $this->dispatchEvent('View.beforeRender' . $templateEventName, [$viewFileName]); $this->Blocks->set('content', $this->_render($viewFileName)); $this->dispatchEvent('View.afterRender', [$viewFileName]); - $this->dispatchEvent('View.afterRender.' . $templateEventName, [$viewFileName]); + $this->dispatchEvent('View.afterRender' . $templateEventName, [$viewFileName]); if ($layout === null) { $layout = $this->layout; diff --git a/tests/TestCase/Shell/BakeShellTest.php b/tests/TestCase/Shell/BakeShellTest.php index 4e6f8994a..a5bda27fb 100644 --- a/tests/TestCase/Shell/BakeShellTest.php +++ b/tests/TestCase/Shell/BakeShellTest.php @@ -28,7 +28,7 @@ class BakeShellTest extends TestCase * * @var array */ - public $fixtures = ['core.comments']; + public $fixtures = ['core.Comments']; /** * @var ConsoleOutput @@ -195,7 +195,6 @@ public function testMain() { $this->exec('bake'); $this->assertExitCode(Shell::CODE_ERROR); - $output = $this->_out->messages(); $expected = [ 'The following commands can be used to generate skeleton code for your application.', @@ -226,7 +225,7 @@ public function testMain() 'By using `cake bake [name]` you can invoke a specific bake task.' ]; - $this->assertSame($expected, $output); + $this->assertOutputContains(implode(PHP_EOL, $expected)); } /** @@ -306,10 +305,12 @@ public function testLoadTasksPlugin() */ public function testLoadTasksVendoredPlugin() { - Plugin::load('Pastry/PastryTest', [ - 'path' => Configure::read('App.paths.plugins')[0] . 'PastryTest' . DS, - 'autoload' => true - ]); + $this->deprecated(function () { + Plugin::load('Pastry/PastryTest', [ + 'path' => Configure::read('App.paths.plugins')[0] . 'PastryTest' . DS, + 'autoload' => true + ]); + }); $this->Shell->loadTasks(); $this->assertContains('Pastry/PastryTest.ApplePie', $this->Shell->tasks); diff --git a/tests/TestCase/Shell/Task/BakeTemplateTaskTest.php b/tests/TestCase/Shell/Task/BakeTemplateTaskTest.php index 96a2e4511..6dcccd431 100644 --- a/tests/TestCase/Shell/Task/BakeTemplateTaskTest.php +++ b/tests/TestCase/Shell/Task/BakeTemplateTaskTest.php @@ -56,7 +56,7 @@ public function tearDown() { parent::tearDown(); unset($this->Task); - Plugin::unload('TestBakeTheme'); + $this->removePlugins(['TestBakeTheme']); } /** diff --git a/tests/TestCase/Shell/Task/ControllerTaskTest.php b/tests/TestCase/Shell/Task/ControllerTaskTest.php index ba661eca9..50b71939f 100644 --- a/tests/TestCase/Shell/Task/ControllerTaskTest.php +++ b/tests/TestCase/Shell/Task/ControllerTaskTest.php @@ -33,10 +33,10 @@ class ControllerTaskTest extends TestCase * @var array */ public $fixtures = [ - 'plugin.bake.bake_articles', - 'plugin.bake.bake_articles_bake_tags', - 'plugin.bake.bake_comments', - 'plugin.bake.bake_tags' + 'plugin.Bake.BakeArticles', + 'plugin.Bake.BakeArticlesBakeTags', + 'plugin.Bake.BakeComments', + 'plugin.Bake.BakeTags' ]; /** @@ -91,8 +91,8 @@ public function tearDown() unset($this->Task); TableRegistry::getTableLocator()->clear(); parent::tearDown(); - Plugin::unload('ControllerTest'); - Plugin::unload('Company/Pastry'); + $this->removePlugins(['ControllerTest']); + $this->removePlugins(['Company/Pastry']); } /** @@ -292,7 +292,11 @@ public function testBakeTest() $this->assertExitCode(Shell::CODE_SUCCESS); $this->assertFilesExist($this->generatedFiles); $this->assertFileContains( - 'class BakeArticlesControllerTest extends IntegrationTestCase', + 'class BakeArticlesControllerTest extends TestCase', + $this->generatedFiles[1] + ); + $this->assertFileContains( + 'use IntegrationTestTrait', $this->generatedFiles[1] ); } diff --git a/tests/TestCase/Shell/Task/FixtureTaskTest.php b/tests/TestCase/Shell/Task/FixtureTaskTest.php index 104ce1cf1..63f6dbaa2 100644 --- a/tests/TestCase/Shell/Task/FixtureTaskTest.php +++ b/tests/TestCase/Shell/Task/FixtureTaskTest.php @@ -34,12 +34,12 @@ class FixtureTaskTest extends TestCase * @var array */ public $fixtures = [ - 'core.articles', - 'core.comments', - 'plugin.bake.datatypes', - 'plugin.bake.binary_tests', - 'plugin.bake.bake_car', - 'core.users' + 'core.Articles', + 'core.Comments', + 'plugin.Bake.Datatypes', + 'plugin.Bake.BinaryTests', + 'plugin.Bake.BakeCar', + 'core.Users' ]; /** @@ -196,7 +196,9 @@ public function testMainWithSingularTable() */ public function testMainWithPluginModel() { - Plugin::load('FixtureTest', ['path' => APP . 'Plugin/FixtureTest/']); + $this->deprecated(function () { + Plugin::load('FixtureTest', ['path' => APP . 'Plugin/FixtureTest/']); + }); $this->generatedFile = APP . 'Plugin/FixtureTest/tests/Fixture/ArticlesFixture.php'; $this->exec('bake fixture --connection test FixtureTest.Articles'); diff --git a/tests/TestCase/Shell/Task/ModelTaskAssociationDetectionTest.php b/tests/TestCase/Shell/Task/ModelTaskAssociationDetectionTest.php index 3e7b54267..8c5de2649 100644 --- a/tests/TestCase/Shell/Task/ModelTaskAssociationDetectionTest.php +++ b/tests/TestCase/Shell/Task/ModelTaskAssociationDetectionTest.php @@ -40,11 +40,11 @@ class ModelTaskAssociationDetectionTest extends TestCase * @var array */ public $fixtures = [ - 'plugin.bake.categories', - 'plugin.bake.categories_products', - 'plugin.bake.old_products', - 'plugin.bake.products', - 'plugin.bake.product_versions', + 'plugin.Bake.Categories', + 'plugin.Bake.CategoriesProducts', + 'plugin.Bake.OldProducts', + 'plugin.Bake.Products', + 'plugin.Bake.ProductVersions', ]; /** diff --git a/tests/TestCase/Shell/Task/ModelTaskTest.php b/tests/TestCase/Shell/Task/ModelTaskTest.php index 93eb285c4..cd5e14db9 100644 --- a/tests/TestCase/Shell/Task/ModelTaskTest.php +++ b/tests/TestCase/Shell/Task/ModelTaskTest.php @@ -48,19 +48,19 @@ class ModelTaskTest extends TestCase * @var array */ public $fixtures = [ - 'core.users', - 'core.counter_cache_users', - 'core.counter_cache_posts', - 'core.comments', - 'core.tags', - 'core.articles_tags', - 'plugin.bake.bake_articles', - 'plugin.bake.bake_comments', - 'plugin.bake.bake_articles_bake_tags', - 'plugin.bake.bake_tags', - 'plugin.bake.category_threads', - 'plugin.bake.invitations', - 'plugin.bake.number_trees', + 'core.Users', + 'core.CounterCacheUsers', + 'core.CounterCachePosts', + 'core.Comments', + 'core.Tags', + 'core.ArticlesTags', + 'plugin.Bake.BakeArticles', + 'plugin.Bake.BakeComments', + 'plugin.Bake.BakeArticlesBakeTags', + 'plugin.Bake.BakeTags', + 'plugin.Bake.CategoryThreads', + 'plugin.Bake.Invitations', + 'plugin.Bake.NumberTrees', ]; /** diff --git a/tests/TestCase/Shell/Task/TemplateTaskTest.php b/tests/TestCase/Shell/Task/TemplateTaskTest.php index 3b1f6d3cd..94c2219e2 100644 --- a/tests/TestCase/Shell/Task/TemplateTaskTest.php +++ b/tests/TestCase/Shell/Task/TemplateTaskTest.php @@ -32,16 +32,16 @@ class TemplateTaskTest extends TestCase * @var array */ public $fixtures = [ - 'core.articles', - 'core.tags', - 'core.articles_tags', - 'core.posts', - 'core.comments', - 'core.test_plugin_comments', - 'plugin.bake.bake_template_authors', - 'plugin.bake.bake_template_roles', - 'plugin.bake.bake_template_profiles', - 'plugin.bake.category_threads', + 'core.Articles', + 'core.Tags', + 'core.ArticlesTags', + 'core.Posts', + 'core.Comments', + 'core.TestPluginComments', + 'plugin.Bake.BakeTemplateAuthors', + 'plugin.Bake.BakeTemplateRoles', + 'plugin.Bake.BakeTemplateProfiles', + 'plugin.Bake.CategoryThreads', ]; /** @@ -263,7 +263,9 @@ public function testGetPathPlugin() $this->Task->controllerName = 'Posts'; $pluginPath = APP . 'Plugin/TestTemplate/'; - Plugin::load('TestTemplate', ['path' => $pluginPath]); + $this->deprecated(function () use ($pluginPath) { + Plugin::load('TestTemplate', ['path' => $pluginPath]); + }); $this->Task->params['plugin'] = $this->Task->plugin = 'TestTemplate'; $result = $this->Task->getPath(); @@ -273,7 +275,7 @@ public function testGetPathPlugin() $result = $this->Task->getPath(); $this->assertPathEquals($pluginPath . 'src/Template/Admin/Posts/', $result); - Plugin::unload('TestTemplate'); + $this->removePlugins(['TestTemplate']); } /** diff --git a/tests/TestCase/Shell/Task/TestTaskTest.php b/tests/TestCase/Shell/Task/TestTaskTest.php index f9f480ccb..3ba9baac3 100644 --- a/tests/TestCase/Shell/Task/TestTaskTest.php +++ b/tests/TestCase/Shell/Task/TestTaskTest.php @@ -37,11 +37,11 @@ class TestTaskTest extends TestCase * @var string */ public $fixtures = [ - 'core.articles', - 'core.tags', - 'core.articles_tags', - 'core.authors', - 'core.comments', + 'core.Articles', + 'core.Tags', + 'core.ArticlesTags', + 'core.Authors', + 'core.Comments', ]; /** @@ -257,7 +257,9 @@ public function testOutputClassOptionsForTable() */ public function testOutputClassOptionsForTablePlugin() { - Plugin::load('BakeTest'); + $this->deprecated(function () { + Plugin::load('BakeTest'); + }); $this->Task->plugin = 'BakeTest'; $expected = [ @@ -294,10 +296,10 @@ public function testFixtureArrayGenerationFromModel() $subject = new ArticlesTable(); $result = $this->Task->generateFixtureList($subject); $expected = [ - 'app.articles', - 'app.authors', - 'app.tags', - 'app.articles_tags' + 'app.Articles', + 'app.Authors', + 'app.Tags', + 'app.ArticlesTags' ]; $this->assertEquals($expected, $result); } @@ -313,7 +315,7 @@ public function testFixtureArrayGenerationIgnoreSelfAssociation() $subject = new CategoryThreadsTable(); $result = $this->Task->generateFixtureList($subject); $expected = [ - 'app.category_threads', + 'app.CategoryThreads', ]; $this->assertEquals($expected, $result); } @@ -328,7 +330,7 @@ public function testFixtureGenerationFromController() $subject = new PostsController(new Request(), new Response()); $result = $this->Task->generateFixtureList($subject); $expected = [ - 'app.posts', + 'app.Posts', ]; $this->assertEquals($expected, $result); } @@ -426,7 +428,7 @@ public function testBakeFixturesParam() ->method('createFile') ->will($this->returnValue(true)); - $this->Task->params['fixtures'] = 'app.posts, app.comments , app.users ,'; + $this->Task->params['fixtures'] = 'app.Posts, app.Comments, app.Users,'; $result = $this->Task->bake('Table', 'Articles'); $this->assertSameAsFile(__FUNCTION__ . '.php', $result); } @@ -756,7 +758,9 @@ public function testBakeWithPlugin() { $this->Task->plugin = 'TestTest'; - Plugin::load('TestTest', ['path' => APP . 'Plugin' . DS . 'TestTest' . DS]); + $this->deprecated(function () { + Plugin::load('TestTest', ['path' => APP . 'Plugin' . DS . 'TestTest' . DS]); + }); $path = APP . 'Plugin/TestTest/tests/TestCase/View/Helper/FormHelperTest.php'; $path = str_replace('/', DS, $path); $this->Task->expects($this->once())->method('createFile') @@ -820,7 +824,9 @@ public function testTestCaseFileNamePlugin() { $this->Task->path = DS . 'my/path/tests/'; - Plugin::load('TestTest', ['path' => APP . 'Plugin' . DS . 'TestTest' . DS]); + $this->deprecated(function () { + Plugin::load('TestTest', ['path' => APP . 'Plugin' . DS . 'TestTest' . DS]); + }); $this->Task->plugin = 'TestTest'; $class = 'TestBake\Model\Entity\Post'; $result = $this->Task->testCaseFileName('entity', $class); diff --git a/tests/TestCase/TestCase.php b/tests/TestCase/TestCase.php index 905538abd..a7e7013ab 100644 --- a/tests/TestCase/TestCase.php +++ b/tests/TestCase/TestCase.php @@ -16,11 +16,13 @@ use Cake\Core\Configure; use Cake\Core\Plugin; -use Cake\TestSuite\ConsoleIntegrationTestCase; +use Cake\TestSuite\ConsoleIntegrationTestTrait; use Cake\TestSuite\StringCompareTrait; +use Cake\TestSuite\TestCase as BaseTestCase; -abstract class TestCase extends ConsoleIntegrationTestCase +abstract class TestCase extends BaseTestCase { + use ConsoleIntegrationTestTrait; use StringCompareTrait; /** @@ -37,9 +39,11 @@ public function setUp() { parent::setUp(); - Plugin::load('WyriHaximus/TwigView', [ - 'bootstrap' => true, - ]); + $this->deprecated(function () { + Plugin::load('WyriHaximus/TwigView', [ + 'bootstrap' => true, + ]); + }); } public function tearDown() @@ -70,10 +74,12 @@ protected function _loadTestPlugin($name) $root = dirname(dirname(__FILE__)) . DS; $path = $root . 'test_app' . DS . 'Plugin' . DS . $name . DS; - Plugin::load($name, [ - 'path' => $path, - 'autoload' => true - ]); + $this->deprecated(function () use ($name, $path) { + Plugin::load($name, [ + 'path' => $path, + 'autoload' => true + ]); + }); } /** diff --git a/tests/TestCase/Utility/Model/AssociationFilterTest.php b/tests/TestCase/Utility/Model/AssociationFilterTest.php index be785f9d0..3ebfb5da5 100644 --- a/tests/TestCase/Utility/Model/AssociationFilterTest.php +++ b/tests/TestCase/Utility/Model/AssociationFilterTest.php @@ -34,13 +34,13 @@ class AssociationFilterTest extends TestCase * @var array */ public $fixtures = [ - 'core.authors', - 'core.tags', - 'plugin.bake.bake_articles', - 'plugin.bake.bake_comments', - 'plugin.bake.bake_articles_bake_tags', - 'plugin.bake.bake_tags', - 'plugin.bake.category_threads', + 'core.Authors', + 'core.Tags', + 'plugin.Bake.BakeArticles', + 'plugin.Bake.BakeComments', + 'plugin.Bake.BakeArticlesBakeTags', + 'plugin.Bake.BakeTags', + 'plugin.Bake.CategoryThreads', ]; /** diff --git a/tests/TestCase/View/Helper/BakeHelperTest.php b/tests/TestCase/View/Helper/BakeHelperTest.php index c695d936a..d466147ff 100644 --- a/tests/TestCase/View/Helper/BakeHelperTest.php +++ b/tests/TestCase/View/Helper/BakeHelperTest.php @@ -37,10 +37,10 @@ class BakeHelperTest extends TestCase * @var array */ public $fixtures = [ - 'plugin.bake.bake_articles', - 'plugin.bake.bake_comments', - 'plugin.bake.bake_articles_bake_tags', - 'plugin.bake.bake_tags', + 'plugin.Bake.BakeArticles', + 'plugin.Bake.BakeComments', + 'plugin.Bake.BakeArticlesBakeTags', + 'plugin.Bake.BakeTags', ]; /** diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 1d9640033..851c32375 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -56,8 +56,6 @@ } ConnectionManager::setConfig('test', ['url' => getenv('db_dsn')]); -Plugin::load('Bake', [ - 'path' => dirname(dirname(__FILE__)) . DS, -]); +Plugin::getCollection()->add(new \Bake\Plugin()); class_alias('PHPUnit\Framework\TestCase', 'PHPUnit_Framework_TestCase'); diff --git a/tests/comparisons/Test/testBakeCommandTest.php b/tests/comparisons/Test/testBakeCommandTest.php index 57cfd351b..4850d780b 100644 --- a/tests/comparisons/Test/testBakeCommandTest.php +++ b/tests/comparisons/Test/testBakeCommandTest.php @@ -2,13 +2,15 @@ namespace App\Test\TestCase\Command; use App\Command\ExampleCommand; -use Cake\TestSuite\ConsoleIntegrationTestCase; +use Cake\TestSuite\ConsoleIntegrationTestTrait; +use Cake\TestSuite\TestCase; /** * App\Command\ExampleCommand Test Case */ -class ExampleCommandTest extends ConsoleIntegrationTestCase +class ExampleCommandTest extends TestCase { + use ConsoleIntegrationTestTrait; /** * setUp method diff --git a/tests/comparisons/Test/testBakeControllerTest.php b/tests/comparisons/Test/testBakeControllerTest.php index a65f1153b..1087bdbd6 100644 --- a/tests/comparisons/Test/testBakeControllerTest.php +++ b/tests/comparisons/Test/testBakeControllerTest.php @@ -2,13 +2,15 @@ namespace Bake\Test\App\Test\TestCase\Controller; use Bake\Test\App\Controller\PostsController; -use Cake\TestSuite\IntegrationTestCase; +use Cake\TestSuite\IntegrationTestTrait; +use Cake\TestSuite\TestCase; /** * Bake\Test\App\Controller\PostsController Test Case */ -class PostsControllerTest extends IntegrationTestCase +class PostsControllerTest extends TestCase { + use IntegrationTestTrait; /** * Fixtures @@ -16,7 +18,7 @@ class PostsControllerTest extends IntegrationTestCase * @var array */ public $fixtures = [ - 'app.posts' + 'app.Posts' ]; /** diff --git a/tests/comparisons/Test/testBakeFixturesParam.php b/tests/comparisons/Test/testBakeFixturesParam.php index 0373501e7..c46144f40 100644 --- a/tests/comparisons/Test/testBakeFixturesParam.php +++ b/tests/comparisons/Test/testBakeFixturesParam.php @@ -24,9 +24,9 @@ class ArticlesTableTest extends TestCase * @var array */ public $fixtures = [ - 'app.posts', - 'app.comments', - 'app.users' + 'app.Posts', + 'app.Comments', + 'app.Users' ]; /** diff --git a/tests/comparisons/Test/testBakePrefixControllerTest.php b/tests/comparisons/Test/testBakePrefixControllerTest.php index 7c35d5382..07e42eef7 100644 --- a/tests/comparisons/Test/testBakePrefixControllerTest.php +++ b/tests/comparisons/Test/testBakePrefixControllerTest.php @@ -2,13 +2,15 @@ namespace Bake\Test\App\Test\TestCase\Controller\Admin; use Bake\Test\App\Controller\Admin\PostsController; -use Cake\TestSuite\IntegrationTestCase; +use Cake\TestSuite\IntegrationTestTrait; +use Cake\TestSuite\TestCase; /** * Bake\Test\App\Controller\Admin\PostsController Test Case */ -class PostsControllerTest extends IntegrationTestCase +class PostsControllerTest extends TestCase { + use IntegrationTestTrait; /** * Fixtures @@ -16,7 +18,7 @@ class PostsControllerTest extends IntegrationTestCase * @var array */ public $fixtures = [ - 'app.posts' + 'app.Posts' ]; /** diff --git a/tests/comparisons/Test/testBakePrefixControllerTestWithCliOption.php b/tests/comparisons/Test/testBakePrefixControllerTestWithCliOption.php index 7c35d5382..07e42eef7 100644 --- a/tests/comparisons/Test/testBakePrefixControllerTestWithCliOption.php +++ b/tests/comparisons/Test/testBakePrefixControllerTestWithCliOption.php @@ -2,13 +2,15 @@ namespace Bake\Test\App\Test\TestCase\Controller\Admin; use Bake\Test\App\Controller\Admin\PostsController; -use Cake\TestSuite\IntegrationTestCase; +use Cake\TestSuite\IntegrationTestTrait; +use Cake\TestSuite\TestCase; /** * Bake\Test\App\Controller\Admin\PostsController Test Case */ -class PostsControllerTest extends IntegrationTestCase +class PostsControllerTest extends TestCase { + use IntegrationTestTrait; /** * Fixtures @@ -16,7 +18,7 @@ class PostsControllerTest extends IntegrationTestCase * @var array */ public $fixtures = [ - 'app.posts' + 'app.Posts' ]; /** diff --git a/tests/comparisons/Test/testBakeShellTest.php b/tests/comparisons/Test/testBakeShellTest.php index 9bbf37efa..d3139c162 100644 --- a/tests/comparisons/Test/testBakeShellTest.php +++ b/tests/comparisons/Test/testBakeShellTest.php @@ -2,13 +2,15 @@ namespace App\Test\TestCase\Shell; use App\Shell\ArticlesShell; -use Cake\TestSuite\ConsoleIntegrationTestCase; +use Cake\TestSuite\ConsoleIntegrationTestTrait; +use Cake\TestSuite\TestCase; /** * App\Shell\ArticlesShell Test Case */ -class ArticlesShellTest extends ConsoleIntegrationTestCase +class ArticlesShellTest extends TestCase { + use ConsoleIntegrationTestTrait; /** * ConsoleIo mock