-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[5.7] Auth/Access/Response::__toString method always should return st…
…ring. __toString should return string, in other case it will emit the FatalError.
- Loading branch information
1 parent
a8cf7f4
commit 6e8431d
Showing
2 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace Illuminate\Tests\Auth; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Illuminate\Auth\Access\Response; | ||
|
||
class AuthAccessResponseTest extends TestCase | ||
{ | ||
/** | ||
* @return void | ||
*/ | ||
public function testStringMethodWillReturnString() | ||
{ | ||
$response = new Response('some data'); | ||
$this->assertSame('some data', (string) $response); | ||
|
||
$response = new Response(); | ||
$this->assertSame('', (string) $response); | ||
} | ||
} |