Skip to content

Commit

Permalink
fix cs and stan, use legacy mockery syntax
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Oitzinger <tobiasoitzinger@gmail.com>
  • Loading branch information
toitzi committed Sep 27, 2024
1 parent aa5d876 commit 4b46a0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/Laravel/Metadata/VisibleHiddenAttributesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function roles(): HasMany

// Mock the ReflectionMethod to return `false` for getFileName to avoid file reading.
$reflectionMock = \Mockery::mock(\ReflectionMethod::class)->makePartial();
$reflectionMock->allows('getFileName')->andReturn(false);
$reflectionMock->shouldReceive('getFileName')->andReturn(false);

$relations = $this->modelMetadata->getRelations($model);

Expand All @@ -119,6 +119,7 @@ private function invokePrivateMethod($object, $methodName, array $parameters = [
$reflection = new \ReflectionClass($object::class);
$method = $reflection->getMethod($methodName);
$method->setAccessible(true);

return $method->invokeArgs($object, $parameters);
}
}

0 comments on commit 4b46a0a

Please sign in to comment.