firefly-iii/app/tests/TestCase.php
2014-08-10 19:02:24 +02:00

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;
}
}