diff --git a/src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php b/src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php index 5021324fde55..83d3fd77235d 100644 --- a/src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php +++ b/src/Illuminate/Foundation/Testing/Concerns/InteractsWithAuthentication.php @@ -13,7 +13,7 @@ trait InteractsWithAuthentication * @param string|null $driver * @return $this */ - public function loginAs(UserContract $user, $driver = null) + public function actingAs(UserContract $user, $driver = null) { $this->be($user, $driver); @@ -40,7 +40,7 @@ public function be(UserContract $user, $driver = null) * @param string|null $guard * @return $this */ - public function assertAuthentication($guard = null) + public function assertAuthenticated($guard = null) { $this->assertTrue($this->isAuthenticated($guard), 'The user is not authenticated'); @@ -118,7 +118,7 @@ public function assertCredentials(array $credentials, $guard = null) * @param string|null $guard * @return $this */ - public function assertCredentialsMissing(array $credentials, $guard = null) + public function assertInvalidCredentials(array $credentials, $guard = null) { $this->assertFalse( $this->hasCredentials($credentials, $guard), 'The given credentials are valid.' diff --git a/tests/Foundation/FoundationAuthenticationTest.php b/tests/Foundation/FoundationAuthenticationTest.php index 9a86aa1d4ce1..124f1156d81d 100644 --- a/tests/Foundation/FoundationAuthenticationTest.php +++ b/tests/Foundation/FoundationAuthenticationTest.php @@ -54,14 +54,14 @@ public function tearDown() m::close(); } - public function testAssertAuthentication() + public function testAssertAuthenticated() { $this->mockGuard() ->shouldReceive('check') ->once() ->andReturn(true); - $this->assertAuthentication(); + $this->assertAuthenticated(); } public function testAssertGuest() @@ -128,6 +128,6 @@ public function testAssertCredentialsMissing() $this->setupProvider($credentials); - $this->assertCredentialsMissing($credentials); + $this->assertInvalidCredentials($credentials); } }