Permalink
Browse files
chore(tests): Add call to migrate data into sqlite
- Loading branch information...
Showing
with
17 additions
and
0 deletions.
-
+17
−0
tests/TestCase.php
|
|
@@ -14,6 +14,23 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase |
|
|
*
|
|
|
* @return \Illuminate\Foundation\Application
|
|
|
*/
|
|
|
+ public function setUp()
|
|
|
+ {
|
|
|
+ parent::setUp();
|
|
|
+ $this->prepareForTests();
|
|
|
+ }
|
|
|
+
|
|
|
+ public function prepareForTests()
|
|
|
+ {
|
|
|
+ Config::set('database.default', 'sqlite');
|
|
|
+ Artisan::call('migrate:refresh');
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Creates the application.
|
|
|
+ *
|
|
|
+ * @return \Illuminate\Foundation\Application
|
|
|
+ */
|
|
|
public function createApplication()
|
|
|
{
|
|
|
$app = require __DIR__.'/../bootstrap/app.php';
|
|
|
|
0 comments on commit
5479619