當前位置: 首頁>>代碼示例>>PHP>>正文


PHP BaseTestCase類代碼示例

本文整理匯總了PHP中BaseTestCase的典型用法代碼示例。如果您正苦於以下問題:PHP BaseTestCase類的具體用法?PHP BaseTestCase怎麽用?PHP BaseTestCase使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了BaseTestCase類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     if (!isset($GLOBALS['PHPUNIT_SA_LEARN_ENABLED']) || $GLOBALS['PHPUNIT_SA_LEARN_ENABLED'] == 0) {
         $this->markTestSkipped('To test the learning behavior, enable the TELL ' . 'command in SpamAssassin and update phpunit.xml');
     }
 }
開發者ID:perk11,項目名稱:php-spamassassin,代碼行數:7,代碼來源:RevokeTest.php

示例2: setup

 function setup()
 {
     parent::setup();
     $app = Prado::getApplication();
     $this->userDao = $app->getModule('daos')->getDao('UserDao');
     $this->flushDatabase();
 }
開發者ID:Nurudeen,項目名稱:prado,代碼行數:7,代碼來源:UserDaoTestCase.php

示例3: setup

 /**
  * Initialisation of config object
  *
  * @author 	Eddie Jaoude
  * @param 	null
  * @return 	null
  *
  */
 public function setup()
 {
     parent::setUp();
     $this->assertEquals(TRUE, is_object($this->_em));
     $this->model = $this->_em->getRepository('Auth_Model_Account');
     $this->appConfigAuth = new Zend_Config_Ini(APPLICATION_PATH . '/modules/auth/configs/auth.ini', APPLICATION_ENV);
 }
開發者ID:MarS2806,項目名稱:Zend-Framework--Doctrine-ORM--PHPUnit--Ant--Jenkins-CI--TDD-,代碼行數:15,代碼來源:AccountTest.php

示例4: tearDown

 /**
  * Cleans up the environment after running a test.
  */
 protected function tearDown()
 {
     // TODO Auto-generated RW_App_Model_UploadTest::tearDown()
     $this->RW_App_Model_Upload = null;
     $this->clearApplicationData();
     parent::tearDown();
 }
開發者ID:realejo,項目名稱:library-zf1,代碼行數:10,代碼來源:UploadTest.php

示例5: tearDown

 /**
  * Cleans up the environment after running a test.
  */
 protected function tearDown()
 {
     parent::tearDown();
     $this->dropTables();
     unset($this->Base);
     $this->clearApplicationData();
 }
開發者ID:realejo,項目名稱:library-zf1,代碼行數:10,代碼來源:BaseExtendedWhereTest.php

示例6: setUpPage

 public function setUpPage()
 {
     $this->timeouts()->implicitWait(3000);
     if (!self::$indexed) {
         $this->url('/wp-admin/');
         if ('Vagrant › Log In' == $this->title()) {
             $this->byId('user_login')->click();
             $this->keys('admin');
             sleep(1);
             // some reason too fast?
             $this->byId('user_pass')->click();
             $this->keys('vagrant');
             $this->byId('wp-submit')->click();
         }
         $this->waitForTitle('Dashboard ‹ Vagrant — WordPress');
         $this->url('http://localhost:8080/wordpress/wp-admin/admin.php?page=elastic_search&tab=index');
         $this->assertEquals('ElasticSearch ‹ Vagrant — WordPress', $this->title());
         sleep(1);
         // some reason too fast?
         $this->byId('wipedata')->click();
         $this->byId('nhp-opts-save');
         sleep(1);
         $this->byId('reindex')->click();
         $this->byCssSelector(".complete");
         self::$indexed = true;
         // give index time to refresh, would rather call refresh on index directly, too lazy :)
         sleep(5);
     }
 }
開發者ID:viz,項目名稱:wordpress-fantastic-elasticsearch,代碼行數:29,代碼來源:BaseTestCase.php

示例7: setUp

 public function setUp()
 {
     parent::setUp();
     $this->status_column = 'status';
     $this->moderated_at_column = 'moderated_at';
     Post::$strictModeration = true;
 }
開發者ID:cryptixcoder,項目名稱:laravel-moderation,代碼行數:7,代碼來源:ModerationTraitTest.php

示例8: setUp

 public function setUp()
 {
     parent::setUp();
     $this->posts = new PostRepository();
     $this->artisan('migrate', ['--database' => 'testbench', '--realpath' => realpath(__DIR__ . '/../migrations')]);
     $this->withFactories(realpath(__DIR__ . '/../factories'));
 }
開發者ID:dannyweeks,項目名稱:laravel-base-repository,代碼行數:7,代碼來源:EloquentIntegrationTest.php

示例9: tearDown

 /**
  * Cleans up the environment after running a test.
  */
 protected function tearDown()
 {
     parent::tearDown();
     // Não inicializa o APPLICATION_DATA pois alguns testes exigem que ele não exista
     //@todo é possível ser condicional? teste case separado?
     // Remove as pastas criadas
     //$this->clearApplicationData();
 }
開發者ID:realejo,項目名稱:library-zf1,代碼行數:11,代碼來源:CacheTest.php

示例10: setUp

 public function setUp()
 {
     parent::setUp();
     \DB::enableQueryLog();
     $this->artisan('migrate', ['--database' => 'testbench', '--realpath' => realpath(__DIR__ . '/../migrations')]);
     $this->withFactories(realpath(__DIR__ . '/../factories'));
     $this->repo = new CachingRepository();
 }
開發者ID:dannyweeks,項目名稱:laravel-base-repository,代碼行數:8,代碼來源:CachingTraitTest.php

示例11: tearDown

 /**
  * Cleans up the environment after running a test.
  */
 protected function tearDown()
 {
     parent::tearDown();
     $this->dropTables();
     unset($this->Db);
     // Remove as pastas criadas
     $this->clearApplicationData();
 }
開發者ID:realejo,項目名稱:library-zf1,代碼行數:11,代碼來源:DbTest.php

示例12: setUp

 public function setUp()
 {
     parent::setUp();
     $this->data = new Matrix(10, 10);
     $this->data->set(1, 1, 0);
     $this->data->set(1, 2, 0);
     $this->board = new Battleships\Board($this->data);
 }
開發者ID:plamen-paskov,項目名稱:battleships,代碼行數:8,代碼來源:BoardTest.php

示例13: setup

 function setup()
 {
     parent::setup();
     $app = Prado::getApplication();
     $this->categoryDao = $app->getModule('daos')->getDao('CategoryDao');
     $this->projectDao = $app->getModule('daos')->getDao('ProjectDao');
     $this->flushDatabase();
 }
開發者ID:Nurudeen,項目名稱:prado,代碼行數:8,代碼來源:CategoryDaoTestCase.php

示例14: tearDown

 public function tearDown()
 {
     MysqlUser::truncate();
     MysqlBook::truncate();
     MysqlRole::truncate();
     Book::truncate();
     parent::tearDown();
 }
開發者ID:Symfomany,項目名稱:laravel-mongo,代碼行數:8,代碼來源:MysqlRelationsTest.php

示例15: testUpdateOwnedIdentities

 public function testUpdateOwnedIdentities()
 {
     parent::resetMongo();
     Doctrine::loadData(dirname(__FILE__) . '/fixtures');
     $lUserHugo = UserTable::getByIdentifier('hugo');
     $lUserHugo->updateOwnedIdentities(array("1", "2", "34"));
     $lRelation = $lUserHugo->retrieveUserRelations();
     $this->assertTrue(in_array("34", $lRelation->getOwnedOi()));
 }
開發者ID:42medien,項目名稱:spreadly,代碼行數:9,代碼來源:UserTest.php


注:本文中的BaseTestCase類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。