File tree Expand file tree Collapse file tree 4 files changed +6
-15
lines changed Expand file tree Collapse file tree 4 files changed +6
-15
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Limenet \LaravelElasticaBridge \Tests \Feature ;
4
4
5
- use Limenet \LaravelElasticaBridge \Tests \App \Elasticsearch \CustomerIndex ;
6
-
7
5
class FeatureTest extends TestCase
8
6
{
9
7
10
8
/** @test */
11
9
public function status ()
12
10
{
13
- $ this ->assertSame (0 , $ this ->artisan ('elastica-bridge:status ' )->run ());
11
+ $ this ->assertSame (0 , $ this ->artisan ('elastica-bridge:status ' )->run ());
14
12
}
15
13
}
Original file line number Diff line number Diff line change 2
2
3
3
namespace Limenet \LaravelElasticaBridge \Tests \Feature ;
4
4
5
- use Limenet \LaravelElasticaBridge \Client \ElasticaClient ;
6
5
use Limenet \LaravelElasticaBridge \Repository \IndexRepository ;
7
6
use Limenet \LaravelElasticaBridge \Tests \App \Elasticsearch \CustomerIndex ;
8
7
use Limenet \LaravelElasticaBridge \Tests \App \Elasticsearch \ProductIndex ;
@@ -19,6 +18,6 @@ public function setUp(): void
19
18
20
19
$ this ->customerIndex = $ this ->app ->make (CustomerIndex::class);
21
20
$ this ->productIndex = $ this ->app ->make (ProductIndex::class);
22
- $ this ->indexRepository =$ this ->app ->make (IndexRepository::class);
21
+ $ this ->indexRepository = $ this ->app ->make (IndexRepository::class);
23
22
}
24
23
}
Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ public function setUp(): void
20
20
fn (string $ modelName ) => 'Limenet \\LaravelElasticaBridge \\Tests \\Database \\Factories \\' .class_basename ($ modelName ).'Factory '
21
21
);
22
22
}
23
- protected function resolveApplicationConfiguration ($ app ){
23
+ protected function resolveApplicationConfiguration ($ app )
24
+ {
24
25
parent ::resolveApplicationConfiguration ($ app );
25
26
26
27
$ app ['config ' ]->set ('elastica-bridge.indices ' , [CustomerIndex::class,ProductIndex::class]);
Original file line number Diff line number Diff line change 2
2
3
3
namespace Limenet \LaravelElasticaBridge \Tests \Unit ;
4
4
5
- use Elastica \Index ;
6
- use Elastica \Query ;
7
- use Elastica \Response ;
8
- use Elastica \ResultSet ;
9
- use Limenet \LaravelElasticaBridge \Exception \Index \BlueGreenIndicesIncorrectlySetupException ;
10
5
use Limenet \LaravelElasticaBridge \Index \IndexInterface ;
11
6
use Limenet \LaravelElasticaBridge \Repository \IndexRepository ;
12
7
use Limenet \LaravelElasticaBridge \Tests \App \Elasticsearch \CustomerIndex ;
13
8
use Limenet \LaravelElasticaBridge \Tests \App \Elasticsearch \ProductIndex ;
14
- use Limenet \LaravelElasticaBridge \Tests \App \Models \Customer ;
15
- use RuntimeException ;
16
9
17
10
class RepositoryTest extends TestCase
18
11
{
@@ -26,13 +19,13 @@ public function setUp():void
26
19
27
20
$ this ->customerIndex = $ this ->app ->make (CustomerIndex::class);
28
21
$ this ->productIndex = $ this ->app ->make (ProductIndex::class);
29
- $ this ->indexRepository =$ this ->app ->make (IndexRepository::class);
22
+ $ this ->indexRepository = $ this ->app ->make (IndexRepository::class);
30
23
}
31
24
/** @test */
32
25
public function all ()
33
26
{
34
27
$ this ->assertCount (2 , $ this ->indexRepository ->all ());
35
- foreach ($ this ->indexRepository ->all () as $ index ){
28
+ foreach ($ this ->indexRepository ->all () as $ index ) {
36
29
$ this ->assertInstanceOf (IndexInterface::class, $ index );
37
30
}
38
31
}
You can’t perform that action at this time.
0 commit comments