本文整理汇总了PHP中Tools\TestSuite\TestCase::setUp方法的典型用法代码示例。如果您正苦于以下问题:PHP TestCase::setUp方法的具体用法?PHP TestCase::setUp怎么用?PHP TestCase::setUp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tools\TestSuite\TestCase
的用法示例。
在下文中一共展示了TestCase::setUp方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
parent::setUp();
//Configure::write('App.namespace', 'TestApp');
$this->Table = TableRegistry::get('Stories');
$this->Table->addBehavior('Tools.Neighbor');
}
示例2: setUp
public function setUp()
{
parent::setUp();
Configure::write('App.namespace', 'TestApp');
$this->Comments = TableRegistry::get('JsonableComments');
$this->Comments->addBehavior('Tools.Jsonable', ['fields' => ['details']]);
}
示例3: setUp
/**
* @return void
*/
public function setUp()
{
parent::setUp();
Router::reload();
$View = new View(null);
$this->Common = new CommonHelper($View);
}
示例4: setUp
public function setUp()
{
parent::setUp();
Configure::write('Localization', ['decimals' => ',', 'thousands' => '.']);
Number::config('en_EN');
$this->Number = new NumberHelper(new View(null));
}
示例5: setUp
public function setUp()
{
parent::setUp();
$this->Url = new UrlHelper(new View(null));
$this->Url->request = new Request();
$this->Url->request->webroot = '';
}
示例6: setUp
/**
* @return void
*/
public function setUp()
{
parent::setUp();
$this->event = new Event('Controller.beforeFilter');
$this->Controller = new UrlComponentTestController(new Request());
Configure::write('App.fullBaseUrl', 'http://localhost');
}
示例7: setUp
public function setUp()
{
parent::setUp();
Configure::write('App.namespace', 'TestApp');
$this->Table = TableRegistry::get('ResetComments');
$this->Table->addBehavior('Tools.Reset');
}
示例8: setUp
/**
* @return void
*/
public function setUp()
{
parent::setUp();
Router::reload();
$View = new View(null);
$this->Flash = new FlashHelper($View);
}
示例9: setUp
public function setUp()
{
parent::setUp();
Configure::write('App.namespace', 'TestApp');
$this->Controller = new CommonComponentTestController(new Request('/test'));
$this->Controller->startupProcess();
}
示例10: setUp
/**
* @return void
*/
public function setUp()
{
parent::setUp();
Configure::write('App.namespace', 'TestApp');
$this->Comments = TableRegistry::get('BitmaskedComments');
$this->Comments->addBehavior('Tools.Bitmasked', ['mappedField' => 'statuses']);
}
示例11: setUp
/**
* setUp method
*
* @return void
*/
public function setUp()
{
parent::setUp();
$this->request = $this->getMock('Cake\\Network\\Request', ['cookie']);
$this->view = new View($this->request);
$this->AuthUser = new AuthUserHelper($this->view);
}
示例12: setUp
public function setUp()
{
parent::setUp();
Configure::write('App.namespace', 'TestApp');
$this->Controller = new Controller();
$this->Controller->startupProcess();
}
示例13: setUp
/**
* @return void
*/
public function setUp()
{
parent::setUp();
Configure::delete('FormConfig');
$this->View = new View(null);
$this->Form = new FormHelper($this->View);
}
示例14: setUp
/**
* setUp method
*
* @return void
*/
public function setUp()
{
parent::setUp();
$controller = new Controller(new Request());
$this->ComponentRegistry = new ComponentRegistry($controller);
$this->AuthUser = new AuthUserComponent($this->ComponentRegistry);
$this->AuthUser->Auth = $this->getMock('Cake\\Controller\\Component\\AuthComponent', ['user'], [$this->ComponentRegistry]);
}
示例15: setUp
/**
* @return void
*/
public function setUp()
{
parent::setUp();
$this->out = new ConsoleOutput();
$this->err = new ConsoleOutput();
$io = new ConsoleIo($this->out, $this->err);
$this->Shell = $this->getMockBuilder(InflectShell::class)->setMethods(['in', '_stop'])->setConstructorArgs([$io])->getMock();
}