@@ -57,7 +57,7 @@ public function test_convert_to_elastica_document_customized(): void
57
57
public function test_convert_to_elastica_document_default (): void
58
58
{
59
59
Product::all ()
60
- ->filter (fn (Product $ product ): bool => $ product ->shouldIndex ($ this ->productIndex ))
60
+ ->filter (fn (Product $ product ): bool => $ product ->shouldIndex ($ this ->productIndex ))
61
61
->each (function (Product $ product ): void {
62
62
$ document = $ product ->toElasticaDocument ($ this ->productIndex );
63
63
$ this ->assertInstanceOf (Document::class, $ document );
@@ -80,19 +80,19 @@ public function test_convert_to_elastica_documentuuid(): void
80
80
{
81
81
Invoice::all ()
82
82
->filter (fn (Invoice $ invoice ): bool => $ invoice ->shouldIndex ($ this ->invoiceIndex ))
83
- ->each (function (Invoice $ invoice ): void {
84
- $ document = $ invoice ->toElasticaDocument ($ this ->invoiceIndex );
85
- $ this ->assertInstanceOf (Document::class, $ document );
86
-
87
- $ this ->assertStringContainsString ('- ' .$ invoice ->getKey (), $ document ->getId ());
88
- $ this ->assertStringContainsString (
89
- str ($ invoice ::class)->classBasename ()->lower ()->append ('- ' )->toString (),
90
- $ document ->getId ()
91
- );
92
- $ this ->assertMatchesRegularExpression ('/[\w\d_-]/ ' , $ document ->getId ());
93
-
94
- $ this ->assertSame ($ invoice ->uuid , $ document ->get (IndexInterface::DOCUMENT_MODEL_ID ));
95
- $ this ->assertSame ($ invoice ::class, $ document ->get (IndexInterface::DOCUMENT_MODEL_CLASS ));
96
- });
83
+ ->each (function (Invoice $ invoice ): void {
84
+ $ document = $ invoice ->toElasticaDocument ($ this ->invoiceIndex );
85
+ $ this ->assertInstanceOf (Document::class, $ document );
86
+
87
+ $ this ->assertStringContainsString ('- ' .$ invoice ->getKey (), $ document ->getId ());
88
+ $ this ->assertStringContainsString (
89
+ str ($ invoice ::class)->classBasename ()->lower ()->append ('- ' )->toString (),
90
+ $ document ->getId ()
91
+ );
92
+ $ this ->assertMatchesRegularExpression ('/[\w\d_-]/ ' , $ document ->getId ());
93
+
94
+ $ this ->assertSame ($ invoice ->uuid , $ document ->get (IndexInterface::DOCUMENT_MODEL_ID ));
95
+ $ this ->assertSame ($ invoice ::class, $ document ->get (IndexInterface::DOCUMENT_MODEL_CLASS ));
96
+ });
97
97
}
98
98
}
0 commit comments