本文整理汇总了PHP中Cake\TestSuite\TestCase类的典型用法代码示例。如果您正苦于以下问题:PHP TestCase类的具体用法?PHP TestCase怎么用?PHP TestCase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TestCase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
$Folder = new Folder($this->Task->path . 'BakeTestApp');
$Folder->delete();
unset($this->Task);
}
示例2: setUp
public function setUp()
{
parent::setUp();
$this->table = new Table(['table' => 'articles']);
$this->table->primaryKey('id');
$this->behavior = new AuditLogBehavior($this->table, ['whitelist' => ['id', 'title', 'body', 'author_id']]);
}
示例3: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
unset($this->usersTable);
unset($this->postsTable);
unset($this->tagsTable);
parent::tearDown();
}
示例4: setUp
/**
* setup method.
*
* @return void
*/
public function setUp()
{
parent::setUp();
$templates = ['checkbox' => '<input type="checkbox" name="{{name}}" value="{{value}}"{{attrs}}>'];
$this->templates = new StringTemplate($templates);
$this->context = $this->getMock('Cake\\View\\Form\\ContextInterface');
}
示例5: tearDown
/**
* tear down
* @return void
*/
public function tearDown()
{
parent::tearDown();
$this->Noticias->removeBehavior("CakePtbr.AjusteData");
unset($this->Noticias, $this->Noticias);
TableRegistry::clear();
}
示例6: setUp
/**
* setUp method
*
* @return void
*/
public function setUp()
{
parent::setUp();
$this->stub = new ConsoleOutput();
$this->io = new ConsoleIo($this->stub);
$this->helper = new ProgressHelper($this->io);
}
示例7: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
Plugin::unload();
ConnectionManager::drop('test_variant');
ConnectionManager::dropAlias('other_name');
}
示例8: tearDown
public function tearDown()
{
unset($this->Notifier);
unset($this->Manager);
unset($this->Model);
parent::tearDown();
}
示例9: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
Plugin::unload();
Router::reload();
Router::defaultRouteClass('Cake\\Routing\\Route\\Route');
}
示例10: setUp
/**
* setup
*
* @return void
*/
public function setUp()
{
parent::setUp();
$templates = ['textarea' => '<textarea name="{{name}}"{{attrs}}>{{value}}</textarea>'];
$this->context = $this->getMock('Cake\\View\\Form\\ContextInterface');
$this->templates = new StringTemplate($templates);
}
示例11: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
Cache::drop('redis');
Cache::drop('redis_groups');
Cache::drop('redis_helper');
}
示例12: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
unset($this->Authorization);
ResolvableAuthorizationInstance::reset();
ResolvableAuthorizationRegistry::reset();
parent::tearDown();
}
示例13: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
unset($this->Number);
I18n::locale($this->locale);
Number::defaultCurrency(false);
}
示例14: tearDown
/**
* tearDown
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
unset($this->Shell);
Configure::write('App.namespace', 'App');
Plugin::unload();
}
示例15: tearDown
/**
* Tear down method.
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
Plugin::unload('Union/Core');
Plugin::unload('TestPlugin');
unset($this->ToolBar, $this->View);
}