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);
 }
Ejemplo n.º 2
0
 /**
  * Returns an object of the model set in auth config
  *
  * @return object
  */
 public function model()
 {
     return $this->repo->model();
 }