本文整理汇总了PHP中Tools\TestSuite\TestCase类的典型用法代码示例。如果您正苦于以下问题:PHP TestCase类的具体用法?PHP TestCase怎么用?PHP TestCase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TestCase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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']);
}
示例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();
Configure::delete('FormConfig');
$this->View = new View(null);
$this->Form = new FormHelper($this->View);
}
示例4: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
Log::drop('email');
Email::drop('test');
Email::dropTransport('debug');
Email::dropTransport('test_smtp');
}
示例5: setUp
public function setUp()
{
parent::setUp();
$this->PostalCodes = TableRegistry::get('Data.PostalCodes');
$entity = $this->PostalCodes->newEntity(['code' => '81222']);
$this->assertEmpty($entity->errors());
$result = $this->PostalCodes->save($entity);
$this->assertNotEmpty($result);
}
示例6: setUp
public function setUp()
{
parent::setUp();
if ($this->isDebug()) {
$this->CurrencyBitcoin = new CurrencyBitcoinLib();
return;
}
$this->CurrencyBitcoin = $this->getMock('Data\\Lib\\CurrencyBitcoinLib', ['_get']);
$this->path = Plugin::path('Data') . 'tests' . DS . 'test_files' . DS . 'json' . DS;
}
示例7: setUp
public function setUp()
{
parent::setUp();
if ($this->isDebug()) {
$this->GeoImport = new GeoImportLib();
return;
}
$this->GeoImport = $this->getMock('Data\\Lib\\GeoImportLib', ['_getFromUrl']);
$this->path = Plugin::path('Data') . 'tests' . DS . 'test_files' . DS . 'html' . DS;
// Liste-der-St-C3-A4dte-in-der-Schweiz-action-edit-section-4.html
Cache::clear();
}
示例8: tearDown
public function tearDown()
{
unset($this->Table);
TableRegistry::clear();
parent::tearDown();
}
示例9: setUp
public function setUp()
{
parent::setUp();
$_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4';
}
示例10: tearDown
public function tearDown()
{
parent::tearDown();
unset($this->Controller);
}
示例11: setUp
public function setUp()
{
parent::setUp();
$this->Text = new Text();
}
示例12: tearDown
/**
* tearDown method
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
}
示例13: setUp
/**
* SetUp method
*
* @return void
*/
public function setUp()
{
parent::setUp();
Configure::write('App.namespace', 'TestApp');
$this->Form = new ContactForm();
}
示例14: setUp
public function setUp()
{
parent::setUp();
$this->MimeTypeHelper = new MimeTypeHelper(new View(null));
}
示例15: tearDown
public function tearDown()
{
parent::tearDown();
unset($this->Timeline);
}