datasource configuration “default” was not found in CakePHP 3
问题 I'm using CakePHP e PHPUnit to execute tests but when I execute a TestCase this error is prompted for every test method: 1) App\Test\TestCase\Model\Table\UsersTableTest::testInitialize Cake\Datasource\Exception\MissingDatasourceConfigException: The datasource configuration "default" was not found. 'Datasources' => [ 'default' => [ 'className' => 'Cake\Database\Connection', 'driver' => 'Cake\Database\Driver\Mysql', 'persistent' => false, 'host' => 'localhost', /** * CakePHP will use the