gaston farruggia
gaston farruggia
Laravel
Comparte:

Problemas con los test

Hola, un problema con los test que no entiendo de que forma resolverlo segui el tutorial red social y en el capitulo "URL para crear estados" no puedo hacer que se ponga verde el test.
El error que me da es el siguiente:
λ "vendor/bin/phpunit"
PHPUnit 7.5.17 by Sebastian Bergmann and contributors.
E                                                                   1 / 1 (100%)
Time: 140 ms, Memory: 14.00 MB
There was 1 error:
1) Tests\Feature\CreateStatusTest::an_authenticate_user_can_create_statuses
Illuminate\Database\QueryException: could not find driver (SQL: select * from sqlite_master where type = 'table' and name = migrations)
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Connection.php:664
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Connection.php:624
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Connection.php:333
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Connection.php:304
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Schema\Builder.php:73
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Migrations\DatabaseMigrationRepository.php:169
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php:555
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Console\Migrations\MigrateCommand.php:97
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Console\Migrations\MigrateCommand.php:63
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:29
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:87
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:31
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Container\Container.php:564
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Console\Command.php:179
C:\laragon\www\social\vendor\symfony\console\Command\Command.php:255
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Console\Command.php:166
C:\laragon\www\social\vendor\symfony\console\Application.php:1011
C:\laragon\www\social\vendor\symfony\console\Application.php:272
C:\laragon\www\social\vendor\symfony\console\Application.php:148
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Console\Application.php:89
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Console\Application.php:188
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php:250
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Foundation\Testing\Concerns\InteractsWithConsole.php:18
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Foundation\Testing\RefreshDatabase.php:40
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Foundation\Testing\RefreshDatabase.php:17
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Foundation\Testing\TestCase.php:104
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Foundation\Testing\TestCase.php:71
Caused by
PDOException: could not find driver
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:68
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:44
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Connectors\SQLiteConnector.php:25
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Connectors\ConnectionFactory.php:218
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Connection.php:915
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Connection.php:399
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Connection.php:325
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Connection.php:657
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Connection.php:624
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Connection.php:333
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Connection.php:304
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Schema\Builder.php:73
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Migrations\DatabaseMigrationRepository.php:169
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php:555
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Console\Migrations\MigrateCommand.php:97
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Database\Console\Migrations\MigrateCommand.php:63
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:29
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:87
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:31
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Container\Container.php:564
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Console\Command.php:179
C:\laragon\www\social\vendor\symfony\console\Command\Command.php:255
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Console\Command.php:166
C:\laragon\www\social\vendor\symfony\console\Application.php:1011
C:\laragon\www\social\vendor\symfony\console\Application.php:272
C:\laragon\www\social\vendor\symfony\console\Application.php:148
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Console\Application.php:89
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Console\Application.php:188
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php:250
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Foundation\Testing\Concerns\InteractsWithConsole.php:18
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Foundation\Testing\RefreshDatabase.php:40
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Foundation\Testing\RefreshDatabase.php:17
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Foundation\Testing\TestCase.php:104
C:\laragon\www\social\vendor\laravel\framework\src\Illuminate\Foundation\Testing\TestCase.php:71
ERRORS!
Tests: 1, Assertions: 0, Errors: 1.
Espero puedan ayudarme, muchas gracias
Jorge Davila
Jorge Davila (0 xp)
Aoarentemente eloquent no puede encontrar el driver que le estas especificando. Revisa que tu archivo de configuraciones lo hayas configurado apropiadamente. Si estas usando sqlite seria algo asi 
 
DB_CONNECTION=sqlite
DB_DATABASE=/absolute/path/to/database.sqlite
 
gaston farruggia
gaston farruggia (0 xp)
en realidad estaba siguiendo el tutorial y nunca especifique nada sobre que base de datos usar o algo asi
gaston farruggia
gaston farruggia (0 xp)
lo pude solucionar el inconveniente es que solamente lo puedo hacer con la base de datos que usa el sitio y no con la base de datos de prueba sqlite, hay algun problema asi?