/** * Checks if the expected website settings will be return * * @test * @group rendering * @group small * @group dev * * @expectedException \Render\APIs\APIv1\WebsiteSettingsNotFound */ public function test_getWebsiteSettings_throwExceptionIfWebsiteSettingsNotExists() { // ARRANGE $websiteSettingsId = 'notExistsWebsiteSettings'; $websiteInfoStorageMock = $this->getWebsiteInfoStorageMock(); $websiteInfoStorageMock->expects($this->any())->method('getWebsiteSettings')->with($this->equalTo($websiteSettingsId))->will($this->throwException(new WebsiteSettingsDoesNotExists())); $renderContextMock = $this->createRenderContextMock(); $renderContextMock->expects($this->atLeastOnce())->method('getWebsiteInfoStorage')->will($this->returnValue($websiteInfoStorageMock)); $headAPI = new HeadAPI($renderContextMock); // ACT $headAPI->getWebsiteSettings($websiteSettingsId); }
/** * Shop Settings Array * * @return array */ public function getShopSettings() { return $this->api->getWebsiteSettings('rz_shop'); }