示例#1
0
 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();
 }
 public function setUp()
 {
     parent::setUp();
     $this->KeyValueBehavior = new KeyValueBehavior();
     $this->Model = ClassRegistry::init('User');
     $this->Model->Behaviors->load('Tools.KeyValue');
 }
示例#3
0
 public function setUp()
 {
     parent::setUp();
     $this->Model = ClassRegistry::init('TestImap');
     $config = [];
     $this->Imap = new TestImapSource($config);
 }
示例#4
0
 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();
 }
 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();
 }
 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']);
 }
示例#7
0
 public function setUp()
 {
     parent::setUp();
     $this->ResetBehavior = new ResetBehavior();
     $this->Model = ClassRegistry::init('MyComment');
     $this->Model->Behaviors->load('Tools.Reset');
 }
 public function setUp()
 {
     parent::setUp();
     Configure::write('Routing.prefixes', ['admin']);
     Router::reload();
     $this->Html = new HtmlExtHelper(new View(null));
 }
 public function setUp()
 {
     parent::setUp();
     $this->MultipleDisplayFieldsBehavior = new MultipleDisplayFieldsBehavior();
     $this->Comment = ClassRegistry::init('Comment');
     $this->Comment->bindModel(['belongsTo' => ['User']], false);
     $this->Comment->displayField = 'comment';
 }
示例#10
0
 /**
  * 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);
 }
示例#11
0
 public function setUp()
 {
     parent::setUp();
     if ($this->isDebug()) {
         Configure::write('Hazard.debug', true);
     }
     $this->HazardLib = new TestHazardLib();
 }
示例#12
0
 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');
 }
示例#13
0
文件: ZipLibTest.php 项目: Jony01/LLD
 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();
 }
 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();
 }
 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();
 }
 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;
     }
 }
示例#17
0
 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--;
     }
 }
示例#18
0
    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);
    }
示例#19
0
    /**
     * 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);
    }
 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);
     }
 }
示例#21
0
 public function setUp()
 {
     parent::setUp();
     $this->Zodiac = new ZodiacLib();
 }
示例#22
0
 public function tearDown()
 {
     parent::tearDown();
     ClassRegistry::flush();
     CakeSession::delete('Auth');
 }
示例#23
0
 public function setUp()
 {
     parent::setUp();
     $this->PhpTagShell = new PhpTagShell();
 }
 public function tearDown()
 {
     parent::tearDown();
     unset($this->Model);
 }
示例#25
0
 public function setUp()
 {
     parent::setUp();
     $this->CodeShell = new CodeShell();
 }
 /**
  * TearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     unset($this->Typography);
     parent::tearDown();
 }
示例#27
0
 /**
  * TearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->QrCode);
 }
示例#28
0
 public function setUp()
 {
     parent::setUp();
     $this->HashShell = new HashShell();
 }
 /**
  * TearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     unset($this->Qurls);
     parent::tearDown();
 }
示例#30
0
 public function setUp()
 {
     parent::setUp();
     $this->Log = new Log();
 }