コード例 #1
0
 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);
 }
コード例 #2
0
 /**
  * @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;
 }