mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-27 11:20:39 -06:00
37 lines
636 B
PHP
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;
|
|
}
|
|
|
|
}
|