bitfumes / laravel-packer

Awesome Command Line Tool for speeding up your package creation.
MIT License
440 stars 44 forks source link

Test in freshly generated package fail "PDOException: could not find driver" #24

Open spekulatius opened 4 years ago

spekulatius commented 4 years ago

Hey @sarthaksavvy

in a freshly generated package without any changes the tests fail (for me).

Steps:

  1. packer new and fill in the requested values
  2. composer install
  3. composer test

I guess this is unexpected.

Cheers, Peter

23:35 $ composer test
> vendor/bin/phpunit
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.2.24-0ubuntu0.18.04.6
Configuration: /tmp/test/Pack/phpunit.xml

EE                                                                  2 / 2 (100%)

Time: 123 ms, Memory: 16.00 MB

There were 2 errors:

1) Peter\Pack\Tests\Feature\ExampleTest::testBasicTest
Illuminate\Database\QueryException: could not find driver (SQL: select * from sqlite_master where type = 'table' and name = migrations)

/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:333
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:304
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:75
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php:169
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:585
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:91
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:63
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:32
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:90
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:34
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/Container.php:576
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Command.php:183
/tmp/test/Pack/vendor/symfony/console/Command/Command.php:255
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Command.php:170
/tmp/test/Pack/vendor/symfony/console/Application.php:1009
/tmp/test/Pack/vendor/symfony/console/Application.php:273
/tmp/test/Pack/vendor/symfony/console/Application.php:149
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Application.php:90
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Application.php:182
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:275
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php:136
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php:220
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php:56
/tmp/test/Pack/tests/TestCase.php:14

Caused by
PDOException: could not find driver

/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:46
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php:25
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:218
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:919
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:399
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:325
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:657
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:333
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:304
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:75
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php:169
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:585
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:91
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:63
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:32
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:90
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:34
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/Container.php:576
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Command.php:183
/tmp/test/Pack/vendor/symfony/console/Command/Command.php:255
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Command.php:170
/tmp/test/Pack/vendor/symfony/console/Application.php:1009
/tmp/test/Pack/vendor/symfony/console/Application.php:273
/tmp/test/Pack/vendor/symfony/console/Application.php:149
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Application.php:90
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Application.php:182
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:275
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php:136
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php:220
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php:56
/tmp/test/Pack/tests/TestCase.php:14

2) Peter\Pack\Tests\Unit\ExampleTest::testBasicTest
Illuminate\Database\QueryException: could not find driver (SQL: select * from sqlite_master where type = 'table' and name = migrations)

/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:333
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:304
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:75
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php:169
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:585
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:91
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:63
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:32
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:90
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:34
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/Container.php:576
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Command.php:183
/tmp/test/Pack/vendor/symfony/console/Command/Command.php:255
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Command.php:170
/tmp/test/Pack/vendor/symfony/console/Application.php:1009
/tmp/test/Pack/vendor/symfony/console/Application.php:273
/tmp/test/Pack/vendor/symfony/console/Application.php:149
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Application.php:90
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Application.php:182
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:275
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php:136
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php:220
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php:56
/tmp/test/Pack/tests/TestCase.php:14

Caused by
PDOException: could not find driver

/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:46
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connectors/SQLiteConnector.php:25
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php:218
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:919
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:399
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:325
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:657
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:624
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:333
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Connection.php:304
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:75
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php:169
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:585
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:91
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:63
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:32
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:90
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:34
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Container/Container.php:576
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Command.php:183
/tmp/test/Pack/vendor/symfony/console/Command/Command.php:255
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Command.php:170
/tmp/test/Pack/vendor/symfony/console/Application.php:1009
/tmp/test/Pack/vendor/symfony/console/Application.php:273
/tmp/test/Pack/vendor/symfony/console/Application.php:149
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Application.php:90
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Console/Application.php:182
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:275
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php:136
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php:220
/tmp/test/Pack/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php:56
/tmp/test/Pack/tests/TestCase.php:14

ERRORS!
Tests: 2, Assertions: 0, Errors: 2.
Script vendor/bin/phpunit handling the test event returned with error code 2