• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Testbench\TestCase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Orchestra\Testbench\TestCase的典型用法代码示例。如果您正苦于以下问题:PHP TestCase类的具体用法?PHP TestCase怎么用?PHP TestCase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了TestCase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: setUp

 public function setUp()
 {
     parent::setUp();
     // setup Slack API
     $token = getenv('slack_token');
     $this->slackApi = new SlackApi($token);
 }
开发者ID:warlof,项目名称:slackbot,代码行数:7,代码来源:SlackChannelsUpdateTest.php


示例17: setUp

 /**
  * @param \Ipunkt\Simpleauth\Repositories\EloquentRepository $repository
  */
 public function setUp()
 {
     parent::setUp();
     $this->repository = new EloquentRepository();
     $artisan = $this->app->make('artisan');
     $artisan->call('migrate', array('--database' => 'testbench', '--path' => '../src/migrations'));
 }
开发者ID:ipunkt,项目名称:auth,代码行数:10,代码来源:EloquentRepositoryTest.php


示例18: setUp

 public function setUp()
 {
     parent::setUp();
     $this->groupRepo = m::mock('Bakgat\\Notos\\Domain\\Model\\Identity\\GroupRepository');
     $this->kindRepo = m::mock('Bakgat\\Notos\\Domain\\Model\\KindRepository');
     $this->groupService = new GroupService($this->kindRepo, $this->groupRepo);
 }
开发者ID:bakgat,项目名称:notos,代码行数:7,代码来源:GroupServiceTest.php


示例19: setUp

 public function setUp()
 {
     parent::setUp();
     $this->queueCheckerJob = new QueueCheckerJob();
     $this->taskMock = m::mock();
     $this->taskMock->shouldReceive('delete');
 }
开发者ID:brucewu16899,项目名称:laravel-queue-checker,代码行数:7,代码来源:QueueCheckerJobTest.php


示例20: getApplicationPaths

 /**
  * Get application paths. Use the preset from the Orchestral package but redefine the storage path
  *
  * @return array
  */
 protected function getApplicationPaths()
 {
     $basePath = __DIR__ . '/../..';
     $orchestralPaths = parent::getApplicationPaths();
     $orchestralPaths['storage'] = "{$basePath}/tests/storage";
     return $orchestralPaths;
 }
开发者ID:inakianduaga,项目名称:eloquent-external-storage,代码行数:12,代码来源:AbstractBaseTestCase.php



注:本文中的Orchestra\Testbench\TestCase类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP vfs\vfsStream类代码示例发布时间:2022-05-23
下一篇:
PHP Test\TestCase类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap