From 0f8c20710e67a0b6712e4e6a2c7bb1425f3a74f8 Mon Sep 17 00:00:00 2001 From: Alfred Nutile Date: Thu, 27 Jun 2024 08:47:47 -0400 Subject: [PATCH] fix test --- app/Domains/Documents/Transformers/DocXTransformer.php | 3 +-- tests/Feature/DocXTransformerTest.php | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/Domains/Documents/Transformers/DocXTransformer.php b/app/Domains/Documents/Transformers/DocXTransformer.php index 624db746..abdfffcb 100644 --- a/app/Domains/Documents/Transformers/DocXTransformer.php +++ b/app/Domains/Documents/Transformers/DocXTransformer.php @@ -23,7 +23,7 @@ public function handle(Document $document): array $parser = IOFactory::createReader('Word2007'); - if(!File::exists($filePath)) { + if (! File::exists($filePath)) { throw new \Exception('Can not fine the document '.$filePath); } @@ -78,7 +78,6 @@ public function handle(Document $document): array ]; } - notify_collection_ui($this->document->collection, CollectionStatusEnum::PROCESSING, 'Processing Document'); diff --git a/tests/Feature/DocXTransformerTest.php b/tests/Feature/DocXTransformerTest.php index 525fafc0..8d074900 100644 --- a/tests/Feature/DocXTransformerTest.php +++ b/tests/Feature/DocXTransformerTest.php @@ -3,9 +3,6 @@ namespace Tests\Feature; use App\Domains\Documents\Transformers\DocXTransformer; -use App\Domains\Documents\Transformers\PowerPointTransformer; -use App\Domains\Documents\TypesEnum; -use App\Models\Document; use App\Models\DocumentChunk; use Illuminate\Support\Facades\Bus; use Illuminate\Support\Facades\Event; @@ -35,7 +32,7 @@ public function test_gets_data_from_docx() $transformer->handle($document); $this->assertDatabaseCount('document_chunks', 1); - $this->assertEquals("Lorem ipsum dolor sit amet.", DocumentChunk::first()->content); + $this->assertEquals('Lorem ipsum dolor sit amet.', DocumentChunk::first()->content); }