Skip to content

Commit

Permalink
Remove old changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Maciej Koprek committed Oct 23, 2024
1 parent 6e151ac commit c2e97a3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
3 changes: 0 additions & 3 deletions .laminas-ci.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"ignore_php_platform_requirements": {
"8.4": true
},
"extensions": [
"apcu",
"bcmath",
Expand Down
6 changes: 3 additions & 3 deletions test/RunnerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

use function is_string;

use const E_USER_WARNING;
use const E_USER_ERROR;
use const E_WARNING;
use const PHP_MAJOR_VERSION;

Expand Down Expand Up @@ -347,13 +347,13 @@ public function testPHPWarningResultsInFailure(): void

public function testPHPUserErrorResultsInFailure(): void
{
$check = new TriggerUserError('error');
$check = new TriggerUserError('error', E_USER_ERROR);
$this->runner->addCheck($check);
$results = $this->runner->run();

self::assertInstanceOf(Failure::class, $results[$check]);
self::assertInstanceOf(ErrorException::class, $results[$check]->getData());
self::assertSame((new ErrorException())->getSeverity(), $results[$check]->getData()->getSeverity());
self::assertSame(E_USER_ERROR, $results[$check]->getData()->getSeverity());
}

public function testBreakOnFirstFailure(): void
Expand Down
5 changes: 4 additions & 1 deletion test/TestAsset/Check/TriggerUserError.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ public function __construct(private string $message, private int $severity, priv
{
}

/** @return bool */
public function check()
{
throw new \ErrorException($this->message);
trigger_error($this->message, $this->severity);

return $this->result;
}
}

0 comments on commit c2e97a3

Please sign in to comment.