Browse Source

Move $fixtures initalization from trait to test class

Val Bancer 6 years ago
parent
commit
51f4d925d7

+ 1 - 1
src/TestSuite/TestCase.php

@@ -49,7 +49,7 @@ abstract class TestCase extends BaseTestCase
      *
      * @var array|string|null
      */
-    public $fixtures = null;
+    public $fixtures;
 
     /**
      * By default, all fixtures attached to this class will be truncated and reloaded after each test.

+ 10 - 0
tests/TestCase/Datasource/PaginatorTest.php

@@ -27,6 +27,16 @@ class PaginatorTest extends TestCase
     use PaginatorTestTrait;
 
     /**
+     * fixtures property
+     *
+     * @var array
+     */
+    public $fixtures = [
+        'core.Posts', 'core.Articles', 'core.ArticlesTags',
+        'core.Authors', 'core.AuthorsTags', 'core.Tags'
+    ];
+
+    /**
      * Don't load data for fixtures for all tests
      *
      * @var bool

+ 0 - 9
tests/TestCase/Datasource/PaginatorTestTrait.php

@@ -23,15 +23,6 @@ use Cake\ORM\Entity;
 
 trait PaginatorTestTrait
 {
-    /**
-     * fixtures property
-     *
-     * @var array
-     */
-    public $fixtures = [
-        'core.Posts', 'core.Articles', 'core.ArticlesTags',
-        'core.Authors', 'core.AuthorsTags', 'core.Tags'
-    ];
 
     /**
      * @var \Cake\Datasource\Paginator