File tree Expand file tree Collapse file tree 2 files changed +64
-3
lines changed Expand file tree Collapse file tree 2 files changed +64
-3
lines changed Original file line number Diff line number Diff line change 11
11
],
12
12
"minimum-stability" : " dev" ,
13
13
"require" : {
14
- "php" : " >=5.5.9" ,
15
- "illuminate/support" : " ~5.0"
14
+ "php" : " ^7.1" ,
15
+ "illuminate/config" : " ~5.5.0|~5.6.0|~5.7.0" ,
16
+ "illuminate/database" : " ~5.5.0|~5.6.0|~5.7.0" ,
17
+ "illuminate/support" : " ~5.5.0|~5.6.0|~5.7.0"
18
+ },
19
+ "require-dev" : {
20
+ "phpunit/phpunit" : " ^6.3|^7.0" ,
21
+ "orchestra/testbench" : " ~3.5.0|~3.6.0"
16
22
},
17
23
"autoload" : {
18
24
"psr-4" : {
19
25
"CodebyRay\\ ReviewRateable\\ " : " src/"
20
26
}
21
27
},
28
+ "autoload-dev" : {
29
+ "psr-4" : {
30
+ "CodebyRay\\ ReviewRateable\\ Test\\ " : " tests"
31
+ }
32
+ },
22
33
"extra" : {
23
34
"laravel" : {
24
35
"providers" : [
25
- " Codebyray \\ ReviewRateable\\ ReviewRateableServiceProvider"
36
+ " CodebyRay \\ ReviewRateable\\ ReviewRateableServiceProvider"
26
37
]
27
38
}
39
+ },
40
+ "scripts" : {
41
+ "test" : " vendor/bin/phpunit" ,
42
+ "test:windows" : " vendor\\ bin\\ phpunit"
28
43
}
29
44
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace CodebyRay \ReviewRateable \Test ;
4
+
5
+ use CodebyRay \ReviewRateable \ReviewRateableServiceProvider ;
6
+ use Orchestra \Testbench \TestCase as Orchestra ;
7
+
8
+ abstract class TestCase extends Orchestra
9
+ {
10
+
11
+ /**
12
+ * Setup the test environment.
13
+ */
14
+ public function setUp ()
15
+ {
16
+ parent ::setUp ();
17
+ }
18
+
19
+ /**
20
+ * add the package provider
21
+ *
22
+ * @param $app
23
+ * @return array
24
+ */
25
+ protected function getPackageProviders ($ app )
26
+ {
27
+ return [ReviewRateableServiceProvider::class];
28
+ }
29
+
30
+ /**
31
+ * Define environment setup.
32
+ *
33
+ * @param \Illuminate\Foundation\Application $app
34
+ * @return void
35
+ */
36
+ protected function getEnvironmentSetUp ($ app )
37
+ {
38
+ // Setup default database to use sqlite :memory:
39
+ $ app ['config ' ]->set ('database.default ' , 'testing ' );
40
+ $ app ['config ' ]->set ('database.connections.testing ' , [
41
+ 'driver ' => 'sqlite ' ,
42
+ 'database ' => ':memory: ' ,
43
+ 'prefix ' => '' ,
44
+ ]);
45
+ }
46
+ }
You can’t perform that action at this time.
0 commit comments