Adldap\Laravel\Tests\DatabaseProviderTest::test_config_login_fallback_no_connection PHP Method

test_config_login_fallback_no_connection() public method

    public function test_config_login_fallback_no_connection()
    {
        $this->app['config']->set('adldap_auth.login_fallback', true);
        $connection = $this->getMockConnection();
        $connection->expects($this->exactly(1))->method('isBound')->willReturn(false);
        EloquentUser::create(['email' => '[email protected]', 'name' => 'John Doe', 'password' => bcrypt('Password123')]);
        $credentials = ['email' => '[email protected]', 'password' => 'Password123'];
        $this->assertTrue(Auth::attempt($credentials));
        $user = Auth::user();
        $this->assertInstanceOf('Adldap\\Laravel\\Tests\\Models\\User', $user);
        $this->assertEquals('[email protected]', $user->email);
    }