Код: Выделить всё
class CommonHelper {
public static function getValue(string $category, string $name)
{
}
}
Код: Выделить всё
public function getContentOrtherService(): array
{
...
$this->lineUrl = CommonHelper::getValue(CommonHelper::LINE, CommonHelper::BASE_ENDPOINT);
...
} catch (Exception $e) {
return $contents;
}
}
Код: Выделить всё
$lineUrl = 'http:line/api';
$this->commonHelper = Mockery::mock('alias:CommonHelper');
$this->commonHelper->shouldReceive('getValue')
->with(CommonHelper::LINE, CommonHelper::BASE_ENDPOINT)
->andReturn($lineUrl);
Я хочу, чтобы макет был корректным с параметры и значения, которые я передаю в макет
Подробнее здесь: https://stackoverflow.com/questions/788 ... ther-class
Мобильная версия