public function testUpdateSite_ShouldSavePassedMeasurableSettings_IfSettingsAreValid() { $type = MobileAppMeasurable\Type::ID; $idSite = $this->addSiteWithType($type, array()); $this->assertSame(1, $idSite); $this->updateSiteSettings($idSite, 'newSiteName', $settings = array('app_id' => 'org.piwik.mobile2')); // verify it was updated $measurable = new Measurable($idSite); $this->assertSame('newSiteName', $measurable->getName()); $this->assertSame('org.piwik.mobile2', $measurable->getSettingValue('app_id')); }
/** * @expectedException \Exception * @expectedExceptionMessage CoreAdminHome_PluginSettingReadNotAllowed */ public function testGetSettingValue_shouldThrowException_IfNoPermissionToRead() { FakeAccess::clearAccess(); $this->measurable->getSettingValue('app_id'); }