php Tools-TestSuite-TestCase类(方法)实例源码

下面列出了php Tools-TestSuite-TestCase 类(方法)源码代码实例,从而了解它的用法。

作者:dereuromar    项目:cakephp-tool   
/**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('App.namespace', 'TestApp');
     $this->Comments = TableRegistry::get('BitmaskedComments');
     $this->Comments->addBehavior('Tools.Bitmasked', ['mappedField' => 'statuses']);
 }

作者:rephe    项目:cakephp-tool   
public function setUp()
 {
     parent::setUp();
     Configure::write('App.namespace', 'TestApp');
     $this->Comments = TableRegistry::get('JsonableComments');
     $this->Comments->addBehavior('Tools.Jsonable', ['fields' => ['details']]);
 }

作者:alesc    项目:cakephp-tool   
/**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::delete('FormConfig');
     $this->View = new View(null);
     $this->Form = new FormHelper($this->View);
 }

作者:dereuromar    项目:cakephp-tool   
/**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     Log::drop('email');
     Email::drop('test');
     Email::dropTransport('debug');
     Email::dropTransport('test_smtp');
 }

作者:dereuromar    项目:cakephp-dat   
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);
 }

作者:dereuromar    项目:cakephp-dat   
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;
 }

作者:dereuromar    项目:cakephp-dat   
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();
 }

作者:alesc    项目:cakephp-tool   
public function tearDown()
 {
     unset($this->Table);
     TableRegistry::clear();
     parent::tearDown();
 }

作者:dereuromar    项目:cakephp-tool   
public function setUp()
 {
     parent::setUp();
     $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4';
 }

作者:olmprakas    项目:cakephp-tool   
public function tearDown()
 {
     parent::tearDown();
     unset($this->Controller);
 }

作者:alesc    项目:cakephp-tool   
public function setUp()
 {
     parent::setUp();
     $this->Text = new Text();
 }

作者:olmprakas    项目:cakephp-tool   
/**
  * tearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
 }

作者:alesc    项目:cakephp-tool   
/**
  * SetUp method
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     Configure::write('App.namespace', 'TestApp');
     $this->Form = new ContactForm();
 }

作者:dereuromar    项目:cakephp-dat   
public function setUp()
 {
     parent::setUp();
     $this->MimeTypeHelper = new MimeTypeHelper(new View(null));
 }

作者:dereuromar    项目:cakephp-tool   
public function tearDown()
 {
     parent::tearDown();
     unset($this->Timeline);
 }

作者:dereuromar    项目:cakephp-dat   
public function setUp()
 {
     parent::setUp();
     $this->Districts = TableRegistry::get('Data.Districts');
 }

作者:olmprakas    项目:cakephp-tool   
public function setUp()
 {
     parent::setUp();
     $this->Tokens = TableRegistry::get('Tools.Tokens');
 }

作者:dereuromar    项目:cakephp-dat   
public function setUp()
 {
     parent::setUp();
     $this->Counties = TableRegistry::get('Data.Counties');
 }

作者:alesc    项目:cakephp-tool   
public function setUp()
 {
     parent::setUp();
     $this->Comments = TableRegistry::get('StringComments');
     $this->Comments->addBehavior('Tools.String', ['fields' => ['title'], 'input' => ['ucfirst']]);
 }

作者:dereuromar    项目:cakephp-tool   
/**
  * TearDown method
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->Common);
 }


问题


面经


文章

微信
公众号

扫码关注公众号