Skip to content

Commit

Permalink
Merge 'Development' into 'Master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedghanem00 committed Jun 7, 2024
1 parent 194de7c commit 523c048
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:
- name: Run PHPStan
run: composer run-script phpstan

- name: Local PHP Security Checker
uses: docker://pplotka/local-php-security-checker-github-actions

- name: Install Tesseract
run: sudo apt install tesseract-ocr

Expand Down
8 changes: 7 additions & 1 deletion tests/Unit/TesseractTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
use PHPUnit\Framework\TestCase;
use Smalot\PdfParser\Parser;
use stdClass;
use Symfony\Component\Process\Exception\ProcessStartFailedException;
use Symfony\Component\Process\Exception\ProcessTimedOutException;

#[CoversClass(Tesseract::class)]
Expand All @@ -44,7 +45,12 @@ public function testGetVersionWithInvalidBinaryPath(): void
{
$tesseract = new Tesseract("/not/exist/path");

$this->expectException(UnsuccessfulExecutionException::class);
# Starting from `symfony/process:>=7.1.1` && PHP>=8.3 on Linux, this exception is being thrown in case that the binary does not exist
if(PHP_OS === 'Linux' && PHP_VERSION_ID >= 80303) {
$this->expectException(ProcessStartFailedException::class);
} else {
$this->expectException(UnsuccessfulExecutionException::class);
}

$tesseract->getVersion();
}
Expand Down

0 comments on commit 523c048

Please sign in to comment.