本文整理匯總了PHP中Translate::shouldReceive方法的典型用法代碼示例。如果您正苦於以下問題:PHP Translate::shouldReceive方法的具體用法?PHP Translate::shouldReceive怎麽用?PHP Translate::shouldReceive使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Translate
的用法示例。
在下文中一共展示了Translate::shouldReceive方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setupModelNotFound
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: setupModelNotFound
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');
}