当前位置: 首页>>代码示例>>PHP>>正文


PHP CMTest_TH::createDefaultCurrency方法代码示例

本文整理汇总了PHP中CMTest_TH::createDefaultCurrency方法的典型用法代码示例。如果您正苦于以下问题:PHP CMTest_TH::createDefaultCurrency方法的具体用法?PHP CMTest_TH::createDefaultCurrency怎么用?PHP CMTest_TH::createDefaultCurrency使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CMTest_TH的用法示例。


在下文中一共展示了CMTest_TH::createDefaultCurrency方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testCreateAllData

 public function testCreateAllData()
 {
     CMTest_TH::createDefaultCurrency();
     $site = $this->getMockSite();
     $language = CM_Model_Language::create('English', 'en', true);
     $currency = CM_Model_Currency::create('978', 'EUR');
     $user = CM_Model_User::createStatic(['site' => $site, 'language' => $language, 'currency' => $currency]);
     $this->assertInternalType('int', $user->getCreated());
     $this->assertEquals(time(), $user->getCreated());
     $this->assertEquals(time(), $user->getLatestActivity());
     $this->assertEquals($site, $user->getSite());
     $this->assertEquals($language, $user->getLanguage());
     $this->assertEquals($currency, $user->getCurrency());
 }
开发者ID:NicolasSchmutz,项目名称:cm,代码行数:14,代码来源:UserTest.php

示例2: testGetters

 public function testGetters()
 {
     $site = CM_Site_Abstract::factory();
     $user = CM_Model_User::createStatic();
     $language = CM_Model_Language::create('English', 'en', true);
     $timezone = new DateTimeZone('Europe/London');
     $debug = true;
     $location = CM_Model_Location::createCountry('United Kingdom', 'UK');
     $currency = CMTest_TH::createDefaultCurrency();
     $environment = new CM_Frontend_Environment($site, $user, $language, $timezone, $debug, $location, $currency);
     $this->assertSame($site, $environment->getSite());
     $this->assertSame($user, $environment->getViewer(true));
     $this->assertSame($language, $environment->getLanguage());
     $this->assertSame($language->getAbbreviation(), $environment->getLocale());
     $this->assertSame($timezone, $environment->getTimeZone());
     $this->assertSame($debug, $environment->isDebug());
     $this->assertSame($location, $environment->getLocation());
     $this->assertSame($currency, $environment->getCurrency());
 }
开发者ID:NicolasSchmutz,项目名称:cm,代码行数:19,代码来源:EnvironmentTest.php

示例3: testDelete

 public function testDelete()
 {
     $currencyDefault = CMTest_TH::createDefaultCurrency();
     $currencyEUR = CM_Model_Currency::create('978', 'EUR');
     $paging = new CM_Paging_Currency_All();
     $this->assertCount(2, $paging);
     $this->assertContainsAll([$currencyDefault, $currencyEUR], $paging->getItems());
     $currencyEUR->delete();
     $paging = new CM_Paging_Currency_All();
     $this->assertCount(1, $paging);
     $this->assertContains($currencyDefault, $paging->getItems());
     $this->assertNotContains($currencyEUR, $paging->getItems());
 }
开发者ID:cargomedia,项目名称:cm,代码行数:13,代码来源:CurrencyTest.php


注:本文中的CMTest_TH::createDefaultCurrency方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。