public function testSaveFalse() { $usageMock = $this->getMockBuilder('OCA\\ocUsageCharts\\Entity\\Storage\\StorageUsage')->disableOriginalConstructor()->getMock(); $this->repository->expects($this->once())->method('save')->willReturn(false); $result = $this->abstractProvider->save($usageMock); $this->assertFalse($result); }
/** * @param ChartConfig $chartConfig * @param StorageUsageRepository $repository * @param User $user * @param Storage $storage * @param ChartUsageHelper $chartUsageHelper */ public function __construct(ChartConfig $chartConfig, StorageUsageRepository $repository, User $user, Storage $storage, ChartUsageHelper $chartUsageHelper) { parent::__construct($chartConfig, $repository, $user, $storage); $this->chartUsageHelper = $chartUsageHelper; }