本文整理汇总了PHP中MyCakeTestCase类的典型用法代码示例。如果您正苦于以下问题:PHP MyCakeTestCase类的具体用法?PHP MyCakeTestCase怎么用?PHP MyCakeTestCase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MyCakeTestCase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
parent::setUp();
//$this->skipIf(!file_exists(APP . 'Config' . DS . 'email.php'), 'no email.php');
Configure::write('Email.live', false);
$this->Email = new TestEmailLib();
}
开发者ID:ByMyHandsOnly,项目名称:BMHO_Web,代码行数:7,代码来源:EmailLibTest.php
示例2: setUp
public function setUp()
{
parent::setUp();
$this->KeyValueBehavior = new KeyValueBehavior();
$this->Model = ClassRegistry::init('User');
$this->Model->Behaviors->load('Tools.KeyValue');
}
开发者ID:ByMyHandsOnly,项目名称:BMHO_Web,代码行数:7,代码来源:KeyValueBehaviorTest.php
示例3: setUp
public function setUp()
{
parent::setUp();
$this->Model = ClassRegistry::init('TestImap');
$config = [];
$this->Imap = new TestImapSource($config);
}
开发者ID:ByMyHandsOnly,项目名称:BMHO_Web,代码行数:7,代码来源:ImapSourceTest.php
示例4: setUp
public function setUp()
{
$this->Model = ClassRegistry::init('Country');
$this->db = ConnectionManager::getDataSource('test');
$this->skipIf(!$this->db instanceof Mysql, 'The subquery test is only compatible with Mysql.');
parent::setUp();
}
开发者ID:Jony01,项目名称:LLD,代码行数:7,代码来源:SubqueryTest.php
示例5: setUp
public function setUp()
{
$this->InlineCss = new InlineCssLib(['engine' => InlineCssLib::ENGINE_CSS_TO_INLINE]);
$result = App::import('Vendor', 'Tools.CssToInlineStyles', ['file' => 'CssToInlineStyles' . DS . 'CssToInlineStyles.php']);
$this->skipIf(!$result);
parent::setUp();
}
开发者ID:ByMyHandsOnly,项目名称:BMHO_Web,代码行数:7,代码来源:InlineCssLibTest.php
示例6: setUp
public function setUp()
{
parent::setUp();
App::build(['Model' => [CakePlugin::path('Tools') . 'Test' . DS . 'test_app' . DS . 'Model' . DS]], App::RESET);
$this->Comment = ClassRegistry::init('BitmaskedComment');
$this->Comment->Behaviors->load('Tools.Bitmasked', ['mappedField' => 'statuses']);
}
开发者ID:ByMyHandsOnly,项目名称:BMHO_Web,代码行数:7,代码来源:BitmaskedBehaviorTest.php
示例7: setUp
public function setUp()
{
parent::setUp();
$this->ResetBehavior = new ResetBehavior();
$this->Model = ClassRegistry::init('MyComment');
$this->Model->Behaviors->load('Tools.Reset');
}
开发者ID:Jony01,项目名称:LLD,代码行数:7,代码来源:ResetBehaviorTest.php
示例8: setUp
public function setUp()
{
parent::setUp();
Configure::write('Routing.prefixes', ['admin']);
Router::reload();
$this->Html = new HtmlExtHelper(new View(null));
}
开发者ID:ByMyHandsOnly,项目名称:BMHO_Web,代码行数:7,代码来源:HtmlExtHelperTest.php
示例9: setUp
public function setUp()
{
parent::setUp();
$this->MultipleDisplayFieldsBehavior = new MultipleDisplayFieldsBehavior();
$this->Comment = ClassRegistry::init('Comment');
$this->Comment->bindModel(['belongsTo' => ['User']], false);
$this->Comment->displayField = 'comment';
}
开发者ID:ByMyHandsOnly,项目名称:BMHO_Web,代码行数:8,代码来源:MultipleDisplayFieldsBehaviorTest.php
示例10: setUp
/**
* PwdShellTest::setUp()
*
* @return void
*/
public function setUp()
{
parent::setUp();
$output = new TestConsoleOutput();
$error = $this->getMock('ConsoleOutput', array(), array(), '', false);
$input = $this->getMock('ConsoleInput', array(), array(), '', false);
$this->PwdShell = new PwdShell($output, $error, $input);
}
开发者ID:Jony01,项目名称:LLD,代码行数:13,代码来源:PwdShellTest.php
示例11: setUp
public function setUp()
{
parent::setUp();
if ($this->isDebug()) {
Configure::write('Hazard.debug', true);
}
$this->HazardLib = new TestHazardLib();
}
开发者ID:ByMyHandsOnly,项目名称:BMHO_Web,代码行数:8,代码来源:HazardLibTest.php
示例12: setUp
public function setUp()
{
parent::setUp();
$this->NamedScopeBehavior = new NamedScopeBehavior();
$this->Comment = ClassRegistry::init('Comment');
$this->Comment->bindModel(array('belongsTo' => array('User')), false);
$this->Comment->displayField = 'comment';
$this->Comment->Behaviors->load('Tools.NamedScope');
$this->Comment->User->Behaviors->load('Tools.NamedScope');
}
开发者ID:Jony01,项目名称:LLD,代码行数:10,代码来源:NamedScopeBehaviorTest.php
示例13: tearDown
public function tearDown()
{
$this->ZipLib->close();
foreach ($this->testFiles as $file => $content) {
unlink(TMP . $file);
}
$this->_rrmdir(TMP . 'xyz');
$this->_rrmdir(TMP . 'xyz2');
parent::tearDown();
}
开发者ID:Jony01,项目名称:LLD,代码行数:10,代码来源:ZipLibTest.php
示例14: setUp
public function setUp()
{
parent::setUp();
$output = new TestConsoleOutput();
$error = $this->getMock('ConsoleOutput', [], [], '', false);
$input = $this->getMock('ConsoleInput', [], [], '', false);
$this->EncodingShell = new TestEncodingShell($output, $error, $input);
$this->EncodingShell->initialize();
$this->EncodingShell->startup();
}
开发者ID:ByMyHandsOnly,项目名称:BMHO_Web,代码行数:10,代码来源:EncodingShellTest.php
示例15: setUp
public function setUp()
{
parent::setUp();
if ($this->isDebug()) {
$this->skipIf(!Configure::read('Mailchimp.apiKey'), 'No API key');
} else {
Configure::write('Mailchimp.apiKey', 'foo-bar');
}
$this->MailchimpAppModel = new MailchimpAppModel();
}
开发者ID:drmonkeyninja,项目名称:cakephp-mailchimp,代码行数:10,代码来源:MailchimpAppModelTest.php
示例16: setUp
public function setUp()
{
parent::setUp();
if ($this->isDebug()) {
$this->skipIf(!Configure::read('Mailchimp.apiKey'), 'No API key');
} else {
Configure::write('Mailchimp.apiKey', 'foo-bar');
}
$this->Mailchimp = new Mailchimp();
if (!$this->isDebug()) {
$this->Mailchimp->Mailchimp = $this->getMock('MailchimpLib', ['_get']);
$this->mockPath = CakePlugin::path('Mailchimp') . 'Test' . DS . 'test_files' . DS . 'mailchimp' . DS;
}
}
开发者ID:drmonkeyninja,项目名称:cakephp-mailchimp,代码行数:14,代码来源:MailchimpTest.php
示例17: setUp
public function setUp()
{
parent::setUp();
$this->SortableBehavior = new SortableBehavior();
$this->Model = ClassRegistry::init('Role');
$this->Model->Behaviors->load('Tools.Sortable');
// Reset order
$list = $this->_getList();
$count = count($list);
foreach ($list as $id => $order) {
$this->Model->id = $id;
$this->Model->saveField('sort', $count);
$count--;
}
}
开发者ID:Jony01,项目名称:LLD,代码行数:15,代码来源:SortableBehaviorTest.php
示例18: setUp
public function setUp()
{
parent::setUp();
$this->Diff = new DiffLib();
$style = <<<CSS
<style type="text/css">
del {
\tcolor: red;
}
ins {
\tcolor: green;
}
</style>
CSS;
$this->out($style, true);
}
开发者ID:ByMyHandsOnly,项目名称:BMHO_Web,代码行数:17,代码来源:DiffLibTest.php
示例19: setUp
/**
* SetUp method
*/
public function setUp()
{
parent::setUp();
$this->Diff = new DiffHelper(new View(null));
$this->Diff->Html = new HtmlHelper(new View(null));
$style = <<<CSS
<style type="text/css">
del {
\tcolor: red;
}
ins {
\tcolor: green;
}
</style>
CSS;
$this->out($style);
}
开发者ID:ByMyHandsOnly,项目名称:BMHO_Web,代码行数:21,代码来源:DiffHelperTest.php
示例20: setUp
public function setUp()
{
parent::setUp();
$path = Configure::read('Bitcoin.config_path');
if (!$path) {
$path = APP . 'Config' . DS;
}
if ($this->skipIf(WINDOWS, '%s does not work on windows')) {
return;
}
if (true && !extension_loaded("curl")) {
dl("php_curl.dll");
//retardation on my PHP/Win7 install
}
if (!isset($this->c)) {
$this->c = new BitcoinClient("http", "fnordbagger", "spambots", "localhost", 8332, null, 0);
}
}
开发者ID:09060906,项目名称:CakePHP-Payment-Plugin,代码行数:18,代码来源:BitcoinClientLibTest.php
注:本文中的MyCakeTestCase类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论