コード例 #1
0
 protected function setupModelNotFound()
 {
     $personRepositoryMock = Mockery::mock('Ixudra\\Portfolio\\Repositories\\Eloquent\\EloquentPersonRepository');
     $personRepositoryMock->shouldReceive('find')->with(self::PERSON_ID)->once()->andReturn(null);
     App::instance('Ixudra\\Portfolio\\Repositories\\Eloquent\\EloquentPersonRepository', $personRepositoryMock);
     Translate::shouldReceive('model')->with('person.error.notFound')->andReturn('Foo_message');
 }
コード例 #2
0
 protected function setupModelNotFound()
 {
     $projectTypeRepositoryMock = Mockery::mock('App\\Repositories\\Eloquent\\EloquentProjectTypeRepository');
     $projectTypeRepositoryMock->shouldReceive('find')->with(self::PROJECT_TYPE_ID)->once()->andReturn(null);
     App::instance('App\\Repositories\\Eloquent\\EloquentProjectTypeRepository', $projectTypeRepositoryMock);
     Translate::shouldReceive('model')->with('projectType.error.notFound')->andReturn('Foo_message');
 }