本文整理汇总了PHP中CakeTestCase::startTest方法的典型用法代码示例。如果您正苦于以下问题:PHP CakeTestCase::startTest方法的具体用法?PHP CakeTestCase::startTest怎么用?PHP CakeTestCase::startTest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CakeTestCase
的用法示例。
在下文中一共展示了CakeTestCase::startTest方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: startTest
/**
* setUp
*
* @return void
* @access public
*/
public function startTest($method)
{
parent::startTest($method);
$this->Session = ClassRegistry::init('SerializedSession');
$this->Content = ClassRegistry::init('SerializedContent');
$this->settings =& $this->Session->Behaviors->Serializable->settings;
}
示例2: startTest
public function startTest($method)
{
parent::startTest($method);
$this->path = App::pluginPath('upload') . 'tests' . DS . 'images' . DS;
$this->source = $this->path . 'panda.jpg';
$this->Resize = new Resize('php', $this->source);
}
示例3: startTest
public function startTest($method)
{
parent::startTest($method);
$this->path = App::pluginPath('upload') . 'tests' . DS . 'images' . DS;
$source = $this->path . 'panda.jpg';
$this->ImageGd = new ImageGd($source);
}
示例4: startTest
/**
* Start test
*
* @return void
* @access public
*/
public function startTest($method = null)
{
$path = APP . 'plugins' . DS . 'plugin_callbacks' . DS . 'tests' . DS . 'mock_app' . DS;
App::import('Model', 'User', 'Model', array(), $path . 'plugins' . DS . 'my_custom_plugin' . DS . 'models' . DS . 'user.php');
$this->MockedPluginModel =& ClassRegistry::init('User');
$this->MockedPluginModel->Behaviors->attach('PluginCallbacks.Callbacks', compact('path'));
parent::startTest($method);
}
示例5: startTest
public function startTest($method)
{
parent::startTest($method);
$this->AdminCrud = new AdminCrudBehavior();
$this->User = ClassRegistry::init('User');
$fixture = new UserFixture();
$this->record = array('User' => $fixture->records[0]);
}
示例6: startTest
/**
* Start Test
*
* @return void
* @access public
*/
public function startTest($method)
{
parent::startTest($method);
$request = new CakeRequest('contacts/add', false);
$Controller = new Controller($request);
$this->View = new View($Controller);
$this->Cleaner = new CleanerHelper($this->View);
$this->Cleaner->Html = new HtmlHelper($this->View);
}
示例7: startTest
/**
* Start test callback
*
* @param string $method Test being executed
* @return void
*/
public function startTest($method)
{
parent::startTest($method);
$this->BitlyApi = new MockBitlyApiBehavior();
if ($this->__testWithMockApi) {
Classregistry::removeObject('bitly_api_behavior');
Classregistry::addObject('bitly_api_behavior', $this->BitlyApi);
}
$this->BitlyAccess = ClassRegistry::init('Bitly.BitlyAccess');
}
示例8: startTest
/**
* Start Test callback
*
* @param string $method
* @return void
*/
public function startTest($method)
{
parent::startTest($method);
$this->Categories = AppMock::getTestController('I18nCategoriesController');
$this->Categories->constructClasses();
$this->Categories->Auth = new CategoriesControllerTestAuthComponent();
$this->Categories->Category = $this->Categories->I18nCategory;
$this->Categories->params = array('named' => array(), 'pass' => array(), 'url' => array());
$fixture = new CategoryFixture();
$this->record = array('I18nCategory' => $fixture->records[0]);
}
示例9: startTest
/**
* Start test callback
*
* @return void
*/
public function startTest($method)
{
parent::startTest($method);
$this->Http = new MockHttpSocket();
ClassRegistry::removeObject('http_socket');
if ($this->__useTestSocket) {
ClassRegistry::addObject('http_socket', $this->Http);
}
if ($this->__useTestSocket) {
Configure::write('Bitly', array('login' => 'testLogin', 'apiKey' => 'testApiKey'));
}
$this->Model = ClassRegistry::init('ModelTest');
$this->BitlyApi = $this->Model->Behaviors->BitlyApi;
}
示例10: startTest
/**
* Start Test callback
*
* @param string $method
* @return void
* @access public
*/
public function startTest($method)
{
parent::startTest($method);
// STI models
$this->Article = ClassRegistry::init('Article');
$this->Page = ClassRegistry::init('Page');
$this->Content = ClassRegistry::init('Content');
$this->Page->Behaviors->attach('Containable');
$this->Article->Behaviors->attach('Containable');
// CTI models
$this->Asset = ClassRegistry::init('Asset');
$this->Link = ClassRegistry::init('Link');
$this->Image = ClassRegistry::init('Image');
}
示例11: startTest
public function startTest($method)
{
parent::startTest($method);
$this->Upload = new UploadHelper();
$this->Upload->Html = new HtmlHelper();
$this->Controller =& new TestUploadHelperUploadController();
$this->View =& new View($this->Controller);
$this->TestUpload = ClassRegistry::init('TestUploadHelperUpload');
$this->TestUser = ClassRegistry::init('TestUploadHelperTestUser');
ClassRegistry::addObject('view', $this->View);
ClassRegistry::addObject('Upload', new TestUploadHelperUpload());
ClassRegistry::addObject('User', new TestUploadHelperTestUser());
$this->record = array('Upload' => array('id' => 1, 'photo' => 'Photo.png', 'dir' => '1', 'type' => 'image/png', 'size' => 8192));
}
示例12: startTest
/**
* Start test method
*
* @return void
*/
public function startTest($method)
{
parent::startTest($method);
$this->CommentWidget = new CommentWidgetHelper();
$this->CommentWidget->Form = new FormHelper();
$this->CommentWidget->Html = new HtmlHelper();
$this->Js = new JsHelper();
$this->CommentWidget->Js = $this->Js;
$this->CommentWidget->params['action'] = 'view';
$this->Controller = ClassRegistry::init('ArticlesTestController');
$this->View = new View($this->Controller);
ClassRegistry::addObject('view', $this->View);
if (!in_array($method, array('testInitialize', 'testOptions'))) {
$this->CommentWidget->initialize();
}
}
示例13: startTest
/**
* (non-PHPdoc)
* @see cake/tests/lib/CakeTestCase#startTest($method)
*/
public function startTest($method)
{
parent::startTest($method);
$this->Comments = new TestCommentsController(new CakeRequest());
$this->Comments->params = array('named' => array(), 'pass' => array(), 'url' => array());
$this->Comments->constructClasses();
}
示例14: startTest
public function startTest($method = null)
{
parent::startTest($method);
$this->__loadController();
$_SERVER['REQUEST_METHOD'] = 'POST';
}
示例15: startTest
/**
*
*
* @param unknown $method
*/
public function startTest($method)
{
parent::startTest($method);
$this->Throttle = ClassRegistry::init('Icing.Throttle');
}