当前位置: 首页>>代码示例>>PHP>>正文


PHP TestCase::setup方法代码示例

本文整理汇总了PHP中TestCase::setup方法的典型用法代码示例。如果您正苦于以下问题:PHP TestCase::setup方法的具体用法?PHP TestCase::setup怎么用?PHP TestCase::setup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TestCase的用法示例。


在下文中一共展示了TestCase::setup方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setup

 public function setup()
 {
     parent::setup();
     $this->app->bind('Interfacer', 'SanitasInterfacer');
     Artisan::call('migrate');
     $this->setVariables();
 }
开发者ID:BaobabHealthTrust,项目名称:iBLIS,代码行数:7,代码来源:ExternalDumpTest.php

示例2: setUp

 public function setUp()
 {
     parent::setup();
     if (!$this->s3ConfigLoaded()) {
         $this->markTestSkipped('S3 Credentials not available.');
     }
 }
开发者ID:plank,项目名称:laravel-mediable,代码行数:7,代码来源:S3UrlGeneratorTest.php

示例3: setup

 public function setup()
 {
     parent::setup();
     $todo = factory(\App\Todo::class)->create();
     // echo $todo;
     $this->id = $todo['id'];
 }
开发者ID:cncgl,项目名称:laravel-todo,代码行数:7,代码来源:TodoTest.php

示例4: setup

 public function setup()
 {
     parent::setup();
     $this->app->bind('Interfacer', 'App\\Api\\MedbossInterfacer');
     Artisan::call('migrate');
     Artisan::call('db:seed');
 }
开发者ID:echiteri,项目名称:iBLIS,代码行数:7,代码来源:MedBossInterfacerTest.php

示例5: setup

 public function setup()
 {
     parent::setup();
     Session::start();
     $this->app["request"]->setSession(Session::driver());
     FieldPresenter::presenter(null);
 }
开发者ID:smallhadroncollider,项目名称:laravel-form-presenter,代码行数:7,代码来源:FieldSetPresenterTest.php

示例6: setup

 /**
  * Setup method.
  */
 public function setup()
 {
     parent::setup();
     $this->fakePlayersService = m::mock('App\\Services\\Players\\PlayersService');
     $this->fakeMatchesService = m::mock('App\\Services\\Matches\\MatchesService');
     $this->service = new SwissService($this->fakePlayersService, $this->fakeMatchesService);
 }
开发者ID:TiagoMaiaL,项目名称:Tournament-Manager,代码行数:10,代码来源:SwissServiceUnitTest.php

示例7: setup

 public function setup()
 {
     parent::setup();
     $this->appManager = \OC::$server->getAppManager();
     $this->groupManager = \OC::$server->getGroupManager();
     $this->userSession = \OC::$server->getUserSession();
     $this->api = new \OCA\Provisioning_API\Apps($this->appManager);
 }
开发者ID:nem0xff,项目名称:core,代码行数:8,代码来源:appstest.php

示例8: setUp

	/**
	 * Sets up the fixture, for example, opens a network connection.
	 * This method is called before a test is executed.
	 *
	 * @return  void
	 *
	 * @since   11.4
	 */
	protected function setUp()
	{
		parent::setup();

		$this->saveFactoryState();

		JFactory::$session = $this->getMockSession();
	}
开发者ID:robschley,项目名称:joomla-platform,代码行数:16,代码来源:JHtmlFormTest.php

示例9: setup

 /**
  * Setup Method.
  */
 public function setup()
 {
     parent::setup();
     $this->fakeMatchesRepo = m::mock('App\\Repositories\\Matches\\IMatchesRepository');
     $this->fakeTournamentsRepo = m::mock('App\\Repositories\\Tournaments\\ITournamentsRepository');
     $this->fakePlayersRepo = m::mock('App\\Repositories\\Players\\IPlayersRepository');
     $this->service = new MatchesService($this->fakeMatchesRepo, $this->fakeTournamentsRepo, $this->fakePlayersRepo);
 }
开发者ID:TiagoMaiaL,项目名称:Tournament-Manager,代码行数:11,代码来源:MatchesServiceUnitTest.php

示例10: setup

 /**
  * Setup method.
  */
 public function setup()
 {
     parent::setup();
     $this->fakeRankingsRepo = m::mock('App\\Repositories\\Rankings\\IRankingsRepository');
     $this->fakePlayersRepo = m::mock('App\\Repositories\\Players\\IPlayersRepository');
     $this->fakeTournamentsRepo = m::mock('App\\Repositories\\Tournaments\\ITournamentsRepository');
     $this->fakeAdministratorsRepository = m::mock('App\\Repositories\\Administrators\\IAdministratorsRepository');
     $this->service = new RankingsService($this->fakeRankingsRepo, $this->fakePlayersRepo, $this->fakeTournamentsRepo, $this->fakeAdministratorsRepository);
 }
开发者ID:TiagoMaiaL,项目名称:Tournament-Manager,代码行数:12,代码来源:RankingsServiceUnitTest.php

示例11: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return  void
  *
  * @since   3.1
  */
 protected function setUp()
 {
     parent::setup();
     $this->saveFactoryState();
     JFactory::$session = $this->getMockSession();
     $this->backupServer = $_SERVER;
     $_SERVER['HTTP_HOST'] = 'example.com';
     $_SERVER['SCRIPT_NAME'] = '';
 }
开发者ID:sural98,项目名称:joomla-cms,代码行数:17,代码来源:JHtmlFormTest.php

示例12: setup

 public function setup()
 {
     parent::setup();
     Session::start();
     $this->app["request"]->setSession(Session::driver());
     $this->presenter = function ($attrs) {
         return "{$attrs["field"]->label()} {$attrs["field"]->display()}";
     };
 }
开发者ID:smallhadroncollider,项目名称:laravel-form-presenter,代码行数:9,代码来源:FieldPresenterTest.php

示例13: setUp

 public function setUp()
 {
     parent::setup();
     $ingredient_repository = new CSVIngredientRepository();
     $recipe_repository = new JSONRecipeRepository();
     $ingredient_repository->setDatasource(app_path() . '/tests/data/ingredients.csv');
     $recipe_repository->setDatasource(app_path() . '/tests/data/recipes.json');
     App::bind('RecipeFinder\\Ingredient\\IngredientRepositoryInterface', 'RecipeFinder\\Ingredient\\CSVIngredientRepository');
     App::bind('RecipeFinder\\Recipe\\RecipeRepositoryInterface', 'RecipeFinder\\Recipe\\JSONRecipeRepository');
     $this->recipe_finder = new RecipeFinder($recipe_repository, $ingredient_repository);
 }
开发者ID:purinda,项目名称:recipefinder,代码行数:11,代码来源:RecipeFinderTest.php

示例14: setUp

 public function setUp()
 {
     parent::setup();
     $this->ingredients_csv = app_path() . '/tests/data/ingredients.csv';
 }
开发者ID:purinda,项目名称:recipefinder,代码行数:5,代码来源:IngredientsTest.php

示例15: setup

 /**
  * Setup method
  */
 public function setup()
 {
     parent::setup();
     $this->repository = $this->app->make('App\\Repositories\\Matches\\IMatchesRepository');
 }
开发者ID:TiagoMaiaL,项目名称:Tournament-Manager,代码行数:8,代码来源:MatchesRepoIntegrationTest.php


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