mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-30 04:33:54 -06:00
41 lines
817 B
PHP
41 lines
817 B
PHP
<?php
|
|
|
|
/**
|
|
* Class TestCase
|
|
*/
|
|
class TestCase extends Illuminate\Foundation\Testing\TestCase
|
|
{
|
|
|
|
/**
|
|
* Creates the application.
|
|
*
|
|
* @return \Symfony\Component\HttpKernel\HttpKernelInterface
|
|
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
|
|
*/
|
|
public function createApplication()
|
|
{
|
|
/** @noinspection PhpUnusedLocalVariableInspection */
|
|
$unitTesting = true;
|
|
|
|
/** @noinspection PhpUnusedLocalVariableInspection */
|
|
$testEnvironment = 'testing';
|
|
|
|
return require __DIR__ . '/../../bootstrap/start.php';
|
|
}
|
|
|
|
/**
|
|
* @param $class
|
|
*
|
|
* @return \Mockery\MockInterface
|
|
*/
|
|
public function mock($class)
|
|
{
|
|
$mock = Mockery::mock($class);
|
|
|
|
$this->app->instance($class, $mock);
|
|
|
|
return $mock;
|
|
}
|
|
|
|
}
|