public function testGetModel() { // Make sure to return the wanted value from config $config = m::mock('Illuminate\\Config\\Repository'); $config->shouldReceive('get')->with('auth.model')->andReturn('_mockedUser')->once(); $this->repo->app['config'] = $config; // Mocks an user $confide_user = $this->mockConfideUser(); // Runs the `model()` method $user = $this->repo->model(); // Assert the result $this->assertInstanceOf('_mockedUser', $user); }
/** * Returns an object of the model set in auth config * * @return object */ public function model() { return $this->repo->model(); }