Skip to content

Commit

Permalink
minor fix improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Nov 26, 2023
1 parent 864f0b1 commit 3ff52a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/HookTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ public function testOnHookDynamicBoundGetterException(): void
$this->expectException(\TypeError::class);
$this->expectExceptionMessage('New $this getter must be static');
$m->onHookDynamic('inc', function (HookMock $m) {
self::isPhpunit9x() ? $this->getName() : $this->name(); // prevent PHP CS Fixer to make this anonymous function static
self::isPhpunit9x() ? $this->getName(false) : $this->name(); // prevent PHP CS Fixer to make this anonymous function static

return $m;
}, $m->makeIncrementResultFx());
Expand Down Expand Up @@ -411,7 +411,7 @@ public function testPassByReference(): void
$value = 0;
$m = new HookMock();
$m->onHookShort('inc', function ($ignore1st, int &$value) {
self::isPhpunit9x() ? $this->getName() : $this->name(); // prevent PHP CS Fixer to make this anonymous function static
self::isPhpunit9x() ? $this->getName(false) : $this->name(); // prevent PHP CS Fixer to make this anonymous function static

++$value;
});
Expand Down

0 comments on commit 3ff52a3

Please sign in to comment.