Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Dec 4, 2024
1 parent 32cf612 commit dcb2447
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ function laravel_or_fail($app, ?string $caller = null): Application
if (\is_null($caller)) {
$caller = transform(debug_backtrace()[1], function ($debug) {
if (isset($debug['class']) && isset($debug['function'])) {
return sprintf('%s::%s', $debug['class'], $debug['function']);
return \sprintf('%s::%s', $debug['class'], $debug['function']);
}

return $debug['function'];
Expand Down
4 changes: 2 additions & 2 deletions tests/HelpersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ public function it_can_compare_phpunit_version()
$this->assertTrue(phpunit_version_compare(Version::id(), '=='));
}

/**
/**
* @test
*/
public function it_can_throw_application_not_available_application_when_app_is_not_laravel()
{
$this->expectException(ApplicationNotAvailableException::class);
$this->expectExceptionMessage(sprintf('Application is not available to run [%s]', __METHOD__));
$this->expectExceptionMessage(\sprintf('Application is not available to run [%s]', __METHOD__));

laravel_or_fail(null);
}
Expand Down

0 comments on commit dcb2447

Please sign in to comment.