firefly-iii/app/tests/TestCase.php
2014-08-10 18:22:42 +02:00

39 lines
693 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()
{
$unitTesting = true;
$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;
}
}