Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Aug 24, 2020
1 parent cf98eea commit b2b755b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/Admin/BackendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function database() {
$dbSizes[] = $dbTable['Data_length'];
}
$dbSize = array_sum($dbSizes);
$maxSize = max($dbSizes);
$maxSize = $dbSizes ? max($dbSizes) : 0;

$this->set(compact('dbTables', 'dbSize', 'maxSize'));
}
Expand Down
7 changes: 7 additions & 0 deletions tests/TestCase/Controller/Admin/BackendControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ class BackendControllerTest extends TestCase {
use DriverSkipTrait;
use IntegrationTestTrait;

/**
* @var string[]
*/
public $fixtures = [
'core.Sessions',
];

/**
* @return void
*/
Expand Down
2 changes: 2 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
]);
Cake\Core\Configure::write('debug', true);

Cake\Utility\Security::setSalt('123');

class_alias(TestApp\Controller\AppController::class, 'App\Controller\AppController');
class_alias(Cake\View\View::class, 'App\View\AppView');

Expand Down

0 comments on commit b2b755b

Please sign in to comment.