コード例 #1
0
ファイル: HeadAPITest.php プロジェクト: rukzuk/rukzuk
 /**
  * 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);
 }
コード例 #2
0
ファイル: ShopSettings.php プロジェクト: rukzuk/rukzuk
 /**
  * Shop Settings Array
  *
  * @return array
  */
 public function getShopSettings()
 {
     return $this->api->getWebsiteSettings('rz_shop');
 }