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


PHP Testbench\TestCase類代碼示例

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


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

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     $artisan = $this->app->make('artisan');
     $artisan->call('migrate', ['--database' => 'testbench', '--path' => '../tests/migrations']);
     $this->countQueries();
 }
開發者ID:acasar,項目名稱:laravel-translatable,代碼行數:7,代碼來源:TestsBase.php

示例2: setUp

 /**
  * Setup the test environment.
  */
 public function setUp()
 {
     parent::setUp();
     $artisan = $this->app->make('artisan');
     $artisan->call('migrate', ['--database' => 'testing', '--path' => '../tests/database/migrations']);
     $artisan->call('db:seed', ['--database' => 'testing', '--class' => 'TopicTableSeeder']);
 }
開發者ID:niclasleonbock,項目名稱:eloquent-activatable,代碼行數:10,代碼來源:ActivatableTestCase.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $artisan = $this->app->make('artisan');
     $output = new BufferedOutput();
     $artisan->call('migrate', ['--database' => 'testbench', '--path' => 'migrations'], $output);
 }
開發者ID:coandacms,項目名稱:coanda-core,代碼行數:7,代碼來源:BaseTest.php

示例4: setUp

 public function setUp()
 {
     parent::setUp();
     //$this->app['cache']->clear();
     $this->setUpDatabase($this->app);
     $this->setUpRoutes($this->app);
 }
開發者ID:Waavi,項目名稱:responsecache,代碼行數:7,代碼來源:TestCase.php

示例5: setUp

 /**
  * Setup the test environment.
  */
 public function setUp()
 {
     parent::setUp();
     $this->artisan('migrate', ['--database' => 'testbench', '--realpath' => realpath(__DIR__ . '/migrations')]);
     $this->withFactories(__DIR__ . '/factories');
     \Cache::flush();
 }
開發者ID:logaretm,項目名稱:depo,代碼行數:10,代碼來源:CachingRepositoryTest.php

示例6: setUp

 public function setUp()
 {
     parent::setUp();
     $this->queries = new Helpers\SqliteQueries();
     $this->migrateDatabase();
     $this->seedDatabase();
 }
開發者ID:czim,項目名稱:laravel-pxlcms,代碼行數:7,代碼來源:TestCase.php

示例7: setUp

 public function setUp()
 {
     parent::setUp();
     if (File::isDirectory('packages')) {
         File::deleteDirectory('packages');
     }
 }
開發者ID:kun391,項目名稱:laravel-generator,代碼行數:7,代碼來源:TestCase.php

示例8: setup

 /**
  * Setup the test environment.
  *
  * @return array
  */
 public function setup()
 {
     parent::setup();
     if (getenv("TRAVIS")) {
         $appName = getenv("KINVEY_APP_NAME");
         $appKey = getenv("KINVEY_APP_KEY");
         $appSecret = getenv("KINVEY_APP_SECRET");
         $masterSecret = getenv("KINVEY_MASTER_SECRET");
         $testMail = getenv("TEST_MAIL");
     } else {
         extract(include __DIR__ . '/TestConfig.php');
     }
     // Kinvey client configuration.
     $this->app['config']->set('kinvey::appName', $appName);
     $this->app['config']->set('kinvey::appKey', $appKey);
     $this->app['config']->set('kinvey::appSecret', $appSecret);
     $this->app['config']->set('kinvey::masterSecret', $masterSecret);
     // Test mail account.
     $this->app['config']->set('kinvey::testMail', $testMail);
     // Eloquent user model.
     $authConfig = $this->app['config']['auth'];
     $authConfig['model'] = 'GovTribe\\LaravelKinvey\\Database\\Eloquent\\User';
     $this->app['config']->set('auth', $authConfig);
     // Default database
     $this->app['config']->set('database.connections.kinvey', array('driver' => 'kinvey'));
     $this->app['config']->set('database.default', 'kinvey');
     // Set the auth mode to admin.
     Kinvey::setAuthMode('admin');
 }
開發者ID:tvpsoft,項目名稱:laravel-kinvey,代碼行數:34,代碼來源:LaravelKinveyTestCase.php

示例9: setUp

 public function setUp()
 {
     parent::setUp();
     require_once __DIR__ . "/../../src/routes.php";
     $this->useMailPretend();
     $this->useNullLogger();
 }
開發者ID:tarantinoOD,項目名稱:laravel-authentication-acl,代碼行數:7,代碼來源:TestCase.php

示例10: tearDown

 public function tearDown()
 {
     parent::tearDown();
     if (file_exists($this->testImage)) {
         unlink($this->testImage);
     }
 }
開發者ID:ankitpokhrel,項目名稱:laravel-image,代碼行數:7,代碼來源:TestCase.php

示例11: tearDown

 /**
  * Clean up the testing environment before the next test.
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->engine);
     unset($this->ourConfigPath);
     unset($this->bridge);
 }
開發者ID:findbrok,項目名稱:laravel-tradeoff-analytics,代碼行數:12,代碼來源:TestEngine.php

示例12: setUp

 public function setUp()
 {
     parent::setUp();
     $this->app->bindShared('path.base', function () {
         return BASE_PATH;
     });
 }
開發者ID:bloomon,項目名稱:laravel-spreadsheet-lang,代碼行數:7,代碼來源:TestCase.php

示例13: tearDown

 /**
  * Tear down test.
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->dilemma);
     unset($this->resolution);
     unset($this->map);
 }
開發者ID:findbrok,項目名稱:laravel-tradeoff-analytics,代碼行數:12,代碼來源:TestMap.php

示例14: setUp

 public function setUp()
 {
     parent::setUp();
     $this->bookRepo = m::mock('Bakgat\\Notos\\Domain\\Model\\Resource\\BookRepository');
     $this->org = Organization::register(new Name('VBS De Klimtoren'), new DomainName('klimtoren.be'));
     $this->spec = new IsbnIsUnique($this->bookRepo);
 }
開發者ID:bakgat,項目名稱:notos,代碼行數:7,代碼來源:IsbnIsUniqueTest.php

示例15: setUp

 /**
  * Setup the test environment.
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->model = Mockery::mock(Model::class)->makePartial();
     $this->repository = Mockery::mock(Repository::class)->makePartial();
     $this->repository->setupRepository($this->model);
 }
開發者ID:nodes-php,項目名稱:database,代碼行數:12,代碼來源:TestCase.php


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