public function test_can_retrieve_by_credentials() { $this->mockGetRepository(); $user = new AuthenticableMock(); $this->repo->shouldReceive('findOneBy')->with(['email' => 'email'])->once()->andReturn($user); $this->assertEquals($user, $this->provider->retrieveByCredentials(['email' => 'email', 'password' => 'password'])); }