本文整理汇总了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();
}
示例2: setUp
public function setUp()
{
parent::setup();
if (!$this->s3ConfigLoaded()) {
$this->markTestSkipped('S3 Credentials not available.');
}
}
示例3: setup
public function setup()
{
parent::setup();
$todo = factory(\App\Todo::class)->create();
// echo $todo;
$this->id = $todo['id'];
}
示例4: setup
public function setup()
{
parent::setup();
$this->app->bind('Interfacer', 'App\\Api\\MedbossInterfacer');
Artisan::call('migrate');
Artisan::call('db:seed');
}
示例5: setup
public function setup()
{
parent::setup();
Session::start();
$this->app["request"]->setSession(Session::driver());
FieldPresenter::presenter(null);
}
示例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);
}
示例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);
}
示例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();
}
示例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);
}
示例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);
}
示例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'] = '';
}
示例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()}";
};
}
示例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);
}
示例14: setUp
public function setUp()
{
parent::setup();
$this->ingredients_csv = app_path() . '/tests/data/ingredients.csv';
}
示例15: setup
/**
* Setup method
*/
public function setup()
{
parent::setup();
$this->repository = $this->app->make('App\\Repositories\\Matches\\IMatchesRepository');
}