/** * @test * * @group quota * @group small * @group dev */ public function test_getDefaultExportQuotaSuccess() { // ARRANGE $expectedExportAllowed = false; ConfigHelper::removeValue(array('quota')); // ACT $quota = new Quota(); $actualExportQuota = $quota->getExportQuota(); // ASSERT $actualExportAllowed = $actualExportQuota->getExportAllowed(); $this->assertEquals($expectedExportAllowed, $actualExportAllowed); }
/** * Checks if the export is allowed. Throws Exception if not! * * @throws \Cms\Exception */ protected function checkExportQuota() { $quota = new Quota(); $exportQuota = $quota->getExportQuota(); if (!$exportQuota->getExportAllowed()) { throw new CmsException(2302, __METHOD__, __LINE__); } }