firefly-iii/tests/TestCase.php
2015-03-31 19:21:49 +02:00

37 lines
636 B
PHP

<?php
/**
* Class TestCase
*/
class TestCase extends Illuminate\Foundation\Testing\TestCase
{
/**
* Creates the application.
*
* @return \Illuminate\Foundation\Application
*/
public function createApplication()
{
$app = require __DIR__ . '/../bootstrap/app.php';
$app->make('Illuminate\Contracts\Console\Kernel')->bootstrap();
return $app;
}
/**
* @param string $class
*
* @return mixed
*/
public function mock($class)
{
$mock = Mockery::mock($class);
$this->app->instance($class, $mock);
return $mock;
}
}