Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
alnutile committed Jun 27, 2024
1 parent fb785ce commit 0f8c207
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions app/Domains/Documents/Transformers/DocXTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -78,7 +78,6 @@ public function handle(Document $document): array
];
}


notify_collection_ui($this->document->collection,
CollectionStatusEnum::PROCESSING, 'Processing Document');

Expand Down
5 changes: 1 addition & 4 deletions tests/Feature/DocXTransformerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

}

Expand Down

0 comments on commit 0f8c207

Please sign in to comment.