Skip to content

Commit

Permalink
Modify method name in FakeHavingCompileInjector and add test requirement
Browse files Browse the repository at this point in the history
The __serialize() method name in FakeHavingCompileInjector was changed to "sleep". Also added a PHP 7.4 requirement annotation to the testSeirialzeInAarray() test case in CompileInjectorTest.php for clarity and compatibility.
  • Loading branch information
koriym committed May 8, 2024
1 parent 3c33e07 commit 9419c3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/CompileInjectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public function testCompileFaillureLog(): void
$this->assertStringContainsString('Error', $log);
}

/** @requires PHP 7.4 */
public function testSeirialzeInAarray()

Check failure on line 111 in tests/CompileInjectorTest.php

View workflow job for this annotation

GitHub Actions / sa / PHPStan

Method Ray\Compiler\CompileInjectorTest::testSeirialzeInAarray() has no return type specified.

Check failure on line 111 in tests/CompileInjectorTest.php

View workflow job for this annotation

GitHub Actions / sa / PHPStan

Method Ray\Compiler\CompileInjectorTest::testSeirialzeInAarray() has no return type specified.
{
$fake = unserialize(serialize(new FakeHavingCompileInjector()));
Expand Down
2 changes: 1 addition & 1 deletion tests/Fake/FakeHavingCompileInjector.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ final class FakeHavingCompileInjector
/** @var InjectorInterface */
public $injector;

public function __serialize()
public function sleep()
{
return [
'injector' => new CompileInjector(__DIR__ . '/tmp', new FakeLazyModule())
Expand Down

0 comments on commit 9419c3f

Please sign in to comment.