Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.2', '8.3', '8.4']
php: ['8.1', '8.2', '8.3', '8.4', '8.5']

steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 6 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,18 @@
"phpunit/phpunit": "^10"
},
"require": {
"php": "^8.1",
"chrome-php/chrome": "^1.10",
"sapientpro/image-comparator": "^1.0",
"inceddy/image-compare": "^1.0",
"symfony/console": "^6.0",
"vlucas/phpdotenv": "^5.6",
"symfony/event-dispatcher": "^6.0",
"smalot/pdfparser": "^2.11"
},
"config": {
"platform": {
"php": "8.1.0"
}
}
}
355 changes: 175 additions & 180 deletions composer.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/Command/ExecuteSuite.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Error;
use PrestaFlow\Library\Utils\Output;
use PrestaFlow\Library\Utils\OutputStates;
use PrestaFlow\Library\Reports\JUnitReport;
use PrestaFlow\Library\Reports\TestRunSummary;
use Symfony\Component\Console\Attribute\AsCommand;
Expand All @@ -20,7 +21,7 @@
hidden: false,
aliases: ['run-test']
)]
class ExecuteSuite extends Command
class ExecuteSuite extends Command implements OutputStates
{
protected $io;
protected $output;
Expand Down
3 changes: 2 additions & 1 deletion src/Tests/TestsSuite.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
use PrestaFlow\Library\Traits\Locale;
use PrestaFlow\Library\Traits\Version;
use PrestaFlow\Library\Utils\Output;
use PrestaFlow\Library\Utils\OutputStates;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\ErrorHandler\Error\FatalError;
use Throwable;
use UnexpectedValueException;

class TestsSuite
class TestsSuite implements OutputStates
{
use Locale;
use Version;
Expand Down
4 changes: 2 additions & 2 deletions src/Traits/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

trait Version
{
const SUPPORTED_VERSIONS = [
private static array $supportedVersions = [
'1.7',
'8',
'9'
Expand All @@ -18,7 +18,7 @@ trait Version

public function isVersionSupported()
{
if (in_array($this->getMajorVersion(), self::SUPPORTED_VERSIONS)) {
if (in_array($this->getMajorVersion(), self::$supportedVersions)) {
return true;
}

Expand Down
18 changes: 0 additions & 18 deletions src/Utils/Output.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,6 @@

trait Output
{
public const FAIL = 'fail';

public const SKIP = 'skip';

public const SKIPPED = 'skipped';

public const RUNS = 'pending';

public const PASS = 'pass';

public const TODO = 'todo';

public const DEBUG = 'debug';

public const OUTPUT_FULL = 'full';
public const OUTPUT_COMPACT = 'compact';
public const OUTPUT_JSON = 'json';

public $cli = false;

/*
Expand Down
18 changes: 18 additions & 0 deletions src/Utils/OutputStates.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace PrestaFlow\Library\Utils;

interface OutputStates
{
public const FAIL = 'fail';
public const SKIP = 'skip';
public const SKIPPED = 'skipped';
public const RUNS = 'pending';
public const PASS = 'pass';
public const TODO = 'todo';
public const DEBUG = 'debug';

public const OUTPUT_FULL = 'full';
public const OUTPUT_COMPACT = 'compact';
public const OUTPUT_JSON = 'json';
}
Loading