本文整理汇总了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();
}
示例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']);
}
示例3: setUp
public function setUp()
{
parent::setUp();
$artisan = $this->app->make('artisan');
$output = new BufferedOutput();
$artisan->call('migrate', ['--database' => 'testbench', '--path' => 'migrations'], $output);
}
示例4: setUp
public function setUp()
{
parent::setUp();
//$this->app['cache']->clear();
$this->setUpDatabase($this->app);
$this->setUpRoutes($this->app);
}
示例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();
}
示例6: setUp
public function setUp()
{
parent::setUp();
$this->queries = new Helpers\SqliteQueries();
$this->migrateDatabase();
$this->seedDatabase();
}
示例7: setUp
public function setUp()
{
parent::setUp();
if (File::isDirectory('packages')) {
File::deleteDirectory('packages');
}
}
示例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');
}
示例9: setUp
public function setUp()
{
parent::setUp();
require_once __DIR__ . "/../../src/routes.php";
$this->useMailPretend();
$this->useNullLogger();
}
示例10: tearDown
public function tearDown()
{
parent::tearDown();
if (file_exists($this->testImage)) {
unlink($this->testImage);
}
}
示例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);
}
示例12: setUp
public function setUp()
{
parent::setUp();
$this->app->bindShared('path.base', function () {
return BASE_PATH;
});
}
示例13: tearDown
/**
* Tear down test.
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
unset($this->dilemma);
unset($this->resolution);
unset($this->map);
}
示例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);
}
示例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);
}