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 1111 ],
1212 "minimum-stability" : " dev" ,
1313 "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"
1622 },
1723 "autoload" : {
1824 "psr-4" : {
1925 "CodebyRay\\ ReviewRateable\\ " : " src/"
2026 }
2127 },
28+ "autoload-dev" : {
29+ "psr-4" : {
30+ "CodebyRay\\ ReviewRateable\\ Test\\ " : " tests"
31+ }
32+ },
2233 "extra" : {
2334 "laravel" : {
2435 "providers" : [
25- " Codebyray \\ ReviewRateable\\ ReviewRateableServiceProvider"
36+ " CodebyRay \\ ReviewRateable\\ ReviewRateableServiceProvider"
2637 ]
2738 }
39+ },
40+ "scripts" : {
41+ "test" : " vendor/bin/phpunit" ,
42+ "test:windows" : " vendor\\ bin\\ phpunit"
2843 }
2944}
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