File tree Expand file tree Collapse file tree 4 files changed +96
-4
lines changed Expand file tree Collapse file tree 4 files changed +96
-4
lines changed Original file line number Diff line number Diff line change @@ -2,15 +2,14 @@ language: php
22
33php :
44 - 7.2
5- - 7.3
65
76env :
87 matrix :
9- - COMPOSER_FLAGS=""
8+ fast_finish : true
109
1110before_script :
1211 - travis_retry composer self-update
13- - travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source
12+ - travis_retry composer install --no-interaction --prefer-source
1413
1514script :
1615 - php vendor/bin/phpunit --coverage-text
Original file line number Diff line number Diff line change 1616 "illuminate/database" : " ^7.0"
1717 },
1818 "require-dev" : {
19- "phpunit/phpunit" : " ^8.0"
19+ "orchestra/database" : " ^5.0" ,
20+ "orchestra/testbench" : " ~5.0"
2021 },
2122 "autoload" : {
2223 "files" : [
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <phpunit bootstrap =" vendor/autoload.php"
3+ backupGlobals =" false"
4+ backupStaticAttributes =" false"
5+ colors =" true"
6+ verbose =" true"
7+ convertErrorsToExceptions =" true"
8+ convertNoticesToExceptions =" true"
9+ convertWarningsToExceptions =" true"
10+ processIsolation =" false"
11+ stopOnFailure =" false" >
12+ <testsuites >
13+ <testsuite name =" Softink Lab Test Suite" >
14+ <directory >tests</directory >
15+ </testsuite >
16+ </testsuites >
17+ <filter >
18+ <whitelist >
19+ <directory suffix =" .php" >src/</directory >
20+ </whitelist >
21+ </filter >
22+ </phpunit >
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace SoftinkLab \LaravelKeyvalueStorage \Test ;
4+
5+ use SoftinkLab \LaravelKeyvalueStorage \Facades \KVOption ;
6+ use SoftinkLab \LaravelKeyvalueStorage \KeyValueStorageServiceProvider ;
7+ use Orchestra \Testbench \TestCase ;
8+
9+ abstract class FacadeTest extends TestsCase
10+ {
11+ /**
12+ * Define environment setup.
13+ *
14+ * @param \Illuminate\Foundation\Application $app
15+ *
16+ * @return void
17+ */
18+ protected function getEnvironmentSetUp ($ app )
19+ {
20+ // Setup default database to use sqlite :memory:
21+ $ app ['config ' ]->set ('database.default ' , 'testbench ' );
22+
23+ $ app ['config ' ]->set (
24+ 'database.connections.testbench ' ,
25+ [
26+ 'driver ' => 'sqlite ' ,
27+ 'database ' => ':memory: ' ,
28+ 'prefix ' => '' ,
29+ ]
30+ );
31+ }
32+
33+ /**
34+ * Setup the test environment.
35+ */
36+ public function setUp (): void
37+ {
38+ parent ::setUp ();
39+
40+ $ this ->loadMigrationsFrom (__DIR__ . '/../database/migrations ' );
41+ }
42+
43+ /**
44+ * Get package providers.
45+ *
46+ * @param \Illuminate\Foundation\Application $app
47+ *
48+ * @return array
49+ */
50+ protected function getPackageProviders ($ app )
51+ {
52+ return [
53+ KeyValueStorageServiceProvider::class,
54+ ];
55+ }
56+
57+ /**
58+ * Get package aliases.
59+ *
60+ * @param \Illuminate\Foundation\Application $app
61+ *
62+ * @return array
63+ */
64+ protected function getPackageAliases ($ app )
65+ {
66+ return [
67+ 'KVOption ' => KVOption::class,
68+ ];
69+ }
70+ }
You can’t perform that action at this time.
0 commit comments