当前位置: 首页>>代码示例>>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;未经允许,请勿转载。