diff --git a/.env.example b/.env.example index fa7e20965..c7a972be5 100644 --- a/.env.example +++ b/.env.example @@ -24,10 +24,6 @@ MAIL_PASSWORD=null MAIL_ENCRYPTION=null MAIL_FROM=you@example.com -API_PREFIX=api -API_VERSION=v1 -API_DEBUG=false - QUEUE_DRIVER=database QUEUE_HIGH=high QUEUE_STANDARD=standard diff --git a/.env.travis b/.env.travis index cd94ca8eb..1b6ed1afa 100644 --- a/.env.travis +++ b/.env.travis @@ -1,13 +1,16 @@ APP_ENV=testing APP_DEBUG=true -APP_KEY=aaaaabbbbbcccccdddddeeeeefffff12 +APP_KEY=SomeRandomString3232RandomString +APP_THEME=pterodactyl +APP_TIMEZONE=UTC +APP_URL=http://localhost/ -TEST_DB_CONNECTION=tests -TEST_DB_TEST_USERNAME=root -TEST_DB_TEST_PASSWORD= -TEST_DB_HOST=127.0.0.1 +DB_HOST=127.0.0.1 +DB_DATABASE=travis +DB_USERNAME=root +DB_PASSWORD="" CACHE_DRIVER=array SESSION_DRIVER=array -QUEUE_DRIVER=sync MAIL_DRIVER=array +QUEUE_DRIVER=sync diff --git a/.travis.yml b/.travis.yml index a56355484..788969b97 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,9 +14,8 @@ before_install: before_script: - phpenv config-rm xdebug.ini - cp .env.travis .env - - composer install --no-interaction --prefer-dist --no-suggest --no-scripts --verbose - - php artisan migrate -v - - php artisan db:seed -v + - composer install --no-interaction --prefer-dist --no-suggest --verbose + - php artisan migrate --seed -v script: - vendor/bin/phpunit --coverage-clover coverage.xml notifications: diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 03fafc49c..9bb72d1f8 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -73,7 +73,10 @@ class AppServiceProvider extends ServiceProvider return Cache::remember('git-version', 5, function () { if (file_exists(base_path('.git/HEAD'))) { $head = explode(' ', file_get_contents(base_path('.git/HEAD'))); - $path = base_path('.git/' . trim($head[1])); + + if (array_key_exists(1, $head)) { + $path = base_path('.git/' . trim($head[1])); + } } if (isset($path) && file_exists($path)) { diff --git a/config/database.php b/config/database.php index 01fa16234..58324a0b5 100644 --- a/config/database.php +++ b/config/database.php @@ -44,19 +44,6 @@ return [ 'prefix' => '', 'strict' => false, ], - - 'tests' => [ - 'driver' => 'mysql', - 'host' => env('TEST_DB_HOST', 'localhost'), - 'port' => env('TEST_DB_PORT', '3306'), - 'database' => env('TEST_DB_DATABASE', 'travis'), - 'username' => env('TEST_DB_USERNAME', 'root'), - 'password' => env('TEST_DB_PASSWORD', ''), - 'charset' => 'utf8', - 'collation' => 'utf8_unicode_ci', - 'prefix' => '', - 'strict' => false, - ], ], /* diff --git a/phpunit.xml b/phpunit.xml index ed3420743..ceb832d08 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -24,7 +24,10 @@ - + + + +