From cfc68a291f7259b57386fa76d586e504d7555d57 Mon Sep 17 00:00:00 2001 From: Stanislav Shupilkin Date: Thu, 21 Mar 2019 11:56:53 +0300 Subject: [PATCH 1/5] use env values from phpunit.xml, update database.php and queue.php --- phpunit.xml.dist | 9 +++++++++ tests/config/database.php | 17 ++++++++++------- tests/config/queue.php | 4 ++-- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 2669537cb..9303aab24 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -42,4 +42,13 @@ tests/ValidationTest.php + + + + + + + + + diff --git a/tests/config/database.php b/tests/config/database.php index f24d20d2f..76f19be58 100644 --- a/tests/config/database.php +++ b/tests/config/database.php @@ -1,5 +1,8 @@ [ @@ -7,21 +10,21 @@ 'mongodb' => [ 'name' => 'mongodb', 'driver' => 'mongodb', - 'host' => 'mongodb', - 'database' => 'unittest', + 'host' => $mongoHost, + 'database' => env('MONGO_DATABASE', 'unittest'), ], 'dsn_mongodb' => [ 'driver' => 'mongodb', - 'dsn' => 'mongodb://mongodb:27017', - 'database' => 'unittest', + 'dsn' => "mongodb://$mongoHost:$mongoPort", + 'database' => env('MONGO_DATABASE', 'unittest'), ], 'mysql' => [ 'driver' => 'mysql', - 'host' => 'mysql', - 'database' => 'unittest', - 'username' => 'root', + 'host' => env('MYSQL_HOST', 'mysql'), + 'database' => env('MYSQL_DATABASE', 'unittest'), + 'username' => env('MYSQL_USERNAME', 'root'), 'password' => '', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', diff --git a/tests/config/queue.php b/tests/config/queue.php index 03bc12044..e8203d90b 100644 --- a/tests/config/queue.php +++ b/tests/config/queue.php @@ -2,7 +2,7 @@ return [ - 'default' => 'database', + 'default' => env('QUEUE_CONNECTION'), 'connections' => [ @@ -16,7 +16,7 @@ ], 'failed' => [ - 'database' => 'mongodb', + 'database' => env('MONGO_DATABASE'), 'table' => 'failed_jobs', ], From 046d66e94ca81889e7456b6043580758296a19ab Mon Sep 17 00:00:00 2001 From: Stanislav Shupilkin Date: Tue, 30 Jul 2019 20:46:56 +0300 Subject: [PATCH 2/5] Add .editorconfig --- .editorconfig | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..fcdf61edc --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true \ No newline at end of file From 913a3a3691ca87fe0e075a76ddf9327aecdac627 Mon Sep 17 00:00:00 2001 From: Stanislav Shupilkin Date: Wed, 31 Jul 2019 09:41:54 +0300 Subject: [PATCH 3/5] Update QueueTest.php --- tests/QueueTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/QueueTest.php b/tests/QueueTest.php index f3ebc94f6..7502ce6f7 100644 --- a/tests/QueueTest.php +++ b/tests/QueueTest.php @@ -24,6 +24,7 @@ public function testQueueJobLifeCycle() 'displayName' => 'test', 'job' => 'test', 'maxTries' => null, + 'delay' => null, 'timeout' => null, 'data' => ['action' => 'QueueJobLifeCycle'], ]), $job->getRawBody()); From 9d9fc1d0e0d1d143fb31d38f3b699dabc88ee7b8 Mon Sep 17 00:00:00 2001 From: Stanislav Shupilkin Date: Fri, 2 Aug 2019 09:33:56 +0300 Subject: [PATCH 4/5] Update phpunit.xml.dist --- phpunit.xml.dist | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 9303aab24..e2d82d39d 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -15,31 +15,31 @@ tests/ - tests/SchemaTest.php + tests/SchemaTest.php - tests/SeederTest.php + tests/SeederTest.php - tests/CacheTest.php + tests/CacheTest.php - tests/QueryBuilderTest.php - tests/QueryTest.php + tests/QueryBuilderTest.php + tests/QueryTest.php - tests/ModelTest.php - tests/RelationsTest.php + tests/ModelTest.php + tests/RelationsTest.php - tests/RelationsTest.php - tests/EmbeddedRelationsTest.php + tests/RelationsTest.php + tests/EmbeddedRelationsTest.php - tests/RelationsTest.php + tests/RelationsTest.php - tests/ValidationTest.php + tests/ValidationTest.php From 453befd202550df2bf71d29884bed7462108daf8 Mon Sep 17 00:00:00 2001 From: Stanislav Shupilkin Date: Fri, 2 Aug 2019 09:45:59 +0300 Subject: [PATCH 5/5] Use in casting instead intval --- tests/config/database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/config/database.php b/tests/config/database.php index 76f19be58..9c22bb05a 100644 --- a/tests/config/database.php +++ b/tests/config/database.php @@ -1,7 +1,7 @@