File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Ensi \LaravelElasticQuery \Tests \Functional ;
4+
5+ use Ensi \LaravelElasticQuery \ElasticClient ;
6+ use Ensi \LaravelElasticQuery \Tests \Models \ProductsIndex ;
7+ use Ensi \LaravelElasticQuery \Tests \Seeds \ProductIndexSeeder ;
8+
9+ class ClientTest extends ElasticTestCase
10+ {
11+ protected function setUp (): void
12+ {
13+ parent ::setUp ();
14+
15+ ProductIndexSeeder::run ();
16+ }
17+
18+ public function testCatIndices (): void
19+ {
20+ $ results = $ this ->newClient ()->catIndices (ProductsIndex::fullName ());
21+
22+ }
23+
24+ private function newClient (): ElasticClient
25+ {
26+ return resolve (ElasticClient::class);
27+ }
28+ }
Original file line number Diff line number Diff line change @@ -9,4 +9,9 @@ class ProductsIndex extends ElasticIndex
99 protected string $ name = 'test_products ' ;
1010
1111 protected string $ tiebreaker = 'product_id ' ;
12+
13+ public static function fullName (): string
14+ {
15+ return (new static ())->indexName ();
16+ }
1217}
You can’t perform that action at this time.
0 commit comments