Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5b35c1c

Browse files
Make use of a testing specific database
1 parent 55bc76c commit 5b35c1c

File tree

11 files changed

+27
-15
lines changed

11 files changed

+27
-15
lines changed

‎.env.example‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
APP_ENV=local
22
APP_DEBUG=true
3-
APP_KEY=SomeRandomString
4-
5-
DB_HOST=localhost
6-
DB_DATABASE=homestead
7-
DB_USERNAME=homestead
8-
DB_PASSWORD=secret
9-
10-
CACHE_DRIVER=file
11-
SESSION_DRIVER=file
3+
APP_KEY=27ceqUDGvdm77abRFSNQbFSVFIz4dGIH
4+
DB_DEFAULT=sqlite

‎.env.testing‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
APP_ENV=testing
2+
APP_DEBUG=true
3+
APP_KEY=27ceqUDGvdm77abRFSNQbFSVFIz4dGIH
4+
DB_DEFAULT=sqlite_testing

‎.travis.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ php:
88

99
before_script:
1010
- composer self-update
11-
- touch storage/database.sqlite
11+
- touch storage/testing.sqlite
1212
- composer install -n --prefer-dist
1313
- php artisan migrate --env=testing
1414
- ./vendor/bin/codecept build

‎config/app.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
|
7979
*/
8080

81-
'key' => env('APP_KEY', '27ceqUDGvdm77abRFSNQbFSVFIz4dGIH'),
81+
'key' => env('APP_KEY', 'SomeRandomString'),
8282

8383
'cipher' => MCRYPT_RIJNDAEL_128,
8484

‎config/database.php‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
|
2727
*/
2828

29-
'default' => 'sqlite',
29+
'default' => env('DB_DEFAULT', 'mysql'),
3030

3131
/*
3232
|--------------------------------------------------------------------------
@@ -52,6 +52,12 @@
5252
'prefix' => '',
5353
],
5454

55+
'sqlite_testing' => [
56+
'driver' => 'sqlite',
57+
'database' => storage_path().'/testing.sqlite',
58+
'prefix' => '',
59+
],
60+
5561
'mysql' => [
5662
'driver' => 'mysql',
5763
'host' => env('DB_HOST', 'localhost'),

‎tests/api.suite.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
class_name: ApiTester
22
modules:
33
enabled: [Laravel5, REST, ApiHelper, Asserts]
4+
config:
5+
Laravel5:
6+
environment_file: .env.testing

‎tests/api/ApiTester.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php //[STAMP] 5d755367328c9e8cbc1341c945f3cad7
1+
<?php //[STAMP] 3f4d6d1bea57fee8772c2202189ad790
22

33
// This class was automatically generated by build task
44
// You should not change it manually as it will be overwritten on next build

‎tests/cli.suite.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
class_name: CliTester
22
modules:
33
enabled: [Filesystem, Cli, CliHelper]
4+
config:
5+
Laravel5:
6+
environment_file: .env.testing

‎tests/cli/CliTester.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php //[STAMP] e32e284a7f8bd0ab5b48b4932d1bd4c2
1+
<?php //[STAMP] 0ff135822f5ccc77fb37324a520930f9
22

33
// This class was automatically generated by build task
44
// You should not change it manually as it will be overwritten on next build

‎tests/functional.suite.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@
77
class_name: FunctionalTester
88
modules:
99
enabled: [Laravel5, FunctionalHelper]
10+
config:
11+
Laravel5:
12+
environment_file: .env.testing

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /