File tree Expand file tree Collapse file tree 5 files changed +26
-11
lines changed Expand file tree Collapse file tree 5 files changed +26
-11
lines changed Original file line number Diff line number Diff line change 23
23
"mockery/mockery" : " 0.9.*" ,
24
24
"orchestra/database" : " 3.6.x-dev@dev" ,
25
25
"orchestra/testbench" : " ^3.6" ,
26
+ "orchestra/testbench-browser-kit" : " ^3.6" ,
26
27
"php-coveralls/php-coveralls" : " *" ,
27
28
"phpmd/phpmd" : " *" ,
28
29
"phpunit/phpunit" : " *" ,
Original file line number Diff line number Diff line change 13
13
syntaxCheck =" false"
14
14
>
15
15
<testsuites >
16
+ <testsuite name =" Feature" >
17
+ <directory suffix =" Test.php" >./tests/Feature</directory >
18
+ </testsuite >
16
19
<testsuite name =" Integration" >
17
20
<directory suffix =" Test.php" >./tests/Integration</directory >
18
21
</testsuite >
Original file line number Diff line number Diff line change @@ -12,12 +12,26 @@ trait CreatesApplication
12
12
{
13
13
protected $ cache ;
14
14
15
+ protected function cache ()
16
+ {
17
+ $ cache = cache ();
18
+
19
+ if (config ('laravel-model-caching.store ' )) {
20
+ $ cache = $ cache ->store (config ('laravel-model-caching.store ' ));
21
+ }
22
+
23
+ return $ cache ;
24
+ }
25
+
15
26
public function setUp ()
16
27
{
17
28
parent ::setUp ();
18
29
30
+ require (__DIR__ . '/routes/web.php ' );
31
+
19
32
$ this ->withFactories (__DIR__ . '/database/factories ' );
20
33
$ this ->loadMigrationsFrom (__DIR__ . '/database/migrations ' );
34
+ view ()->addLocation (__DIR__ . '/resources/views ' , 'laravel-model-caching ' );
21
35
22
36
$ this ->cache = cache ()
23
37
->store (config ('laravel-model-caching.store ' ));
Original file line number Diff line number Diff line change
1
+ <?php namespace GeneaLabs \LaravelModelCaching \Tests ;
2
+
3
+ use Orchestra \Testbench \BrowserKit \TestCase as BaseTestCase ;
4
+
5
+ abstract class FeatureTestCase extends BaseTestCase
6
+ {
7
+ use CreatesApplication;
8
+ }
Original file line number Diff line number Diff line change 5
5
abstract class IntegrationTestCase extends BaseTestCase
6
6
{
7
7
use CreatesApplication;
8
-
9
- protected function cache ()
10
- {
11
- $ cache = cache ();
12
-
13
- if (config ('laravel-model-caching.store ' )) {
14
- $ cache = $ cache ->store (config ('laravel-model-caching.store ' ));
15
- }
16
-
17
- return $ cache ;
18
- }
19
8
}
You can’t perform that action at this time.
0 commit comments