File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Limenet \LaravelElasticaBridge \Tests ;
4
+
5
+ use Elastica \Document ;
6
+ use Limenet \LaravelElasticaBridge \Client \ElasticaClient ;
7
+ use Limenet \LaravelElasticaBridge \Index \IndexInterface ;
8
+ use Limenet \LaravelElasticaBridge \Tests \App \Elasticsearch \CustomerIndex ;
9
+ use Limenet \LaravelElasticaBridge \Tests \App \Models \Customer ;
10
+
11
+ class ClientTest extends TestCase
12
+ {
13
+ protected ElasticaClient $ elasticaClient ;
14
+
15
+ public function setUp ():void
16
+ {
17
+ parent ::setUp ();
18
+
19
+ $ this ->elasticaClient = $ this ->app ->make (ElasticaClient::class);
20
+ }
21
+ /** @test */
22
+ public function configured_client ()
23
+ {
24
+ $ client = $ this ->elasticaClient ->getClient ();
25
+
26
+ $ this ->assertSame (config ('elastica-bridge.elasticseach.host ' ), $ client ->getConfig ('host ' ));
27
+ $ this ->assertEquals (config ('elastica-bridge.elasticseach.port ' ), $ client ->getConfig ('port ' ));
28
+ }
29
+ }
Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ protected function getPackageProviders($app)
29
29
public function getEnvironmentSetUp ($ app )
30
30
{
31
31
config ()->set ('database.default ' , 'testing ' );
32
+
33
+ config ()->set ('elastica-bridge.elasticseach.host ' , 'localhost ' );
34
+ config ()->set ('elastica-bridge.elasticseach.port ' , 9200 );
32
35
}
33
36
34
37
protected function defineDatabaseMigrations ():void
You can’t perform that action at this time.
0 commit comments