Hello,
I would like to use fixture for my test.
I have made the 1st tutorial about articles (posts) and tests tuto too. But it does not work and I really do not understand what I have to do to run fixtures tests.
More clearly, I do not understand this error :
.Exception: Unable to insert fixtures for “App\Test\TestCase\Controller\ArticlesControllerTest” test case. SQLSTATE[HY000] [2002] No such file or directory in […www/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureManager.php, line 348]
Every posts on stackoverflow speak about the configuration of my database which is :
‘test’ => [
‘className’ => ‘Cake\Database\Connection’,
‘driver’ => ‘Cake\Database\Driver\Mysql’,
‘persistent’ => false,
‘host’ => ‘localhost’,
//‘port’ => ‘non_standard_port_number’,
‘username’ => ‘root’,
‘password’ => ‘root’,
‘database’ => ‘tmp_test’,
‘encoding’ => ‘utf8’,
‘timezone’ => ‘UTC’,
‘cacheMetadata’ => true,
‘quoteIdentifiers’ => false,
‘log’ => false,
//‘init’ => [‘SET GLOBAL innodb_stats_on_metadata = 0’],
‘url’ => env(‘DATABASE_TEST_URL’, null),
],
Have you some website with tuto to help me or the solution ?
Thank you,
Vincent.