firefly-iii/app/tests/TestCase.php

41 lines
817 B
PHP
Raw Normal View History

2014-06-28 02:41:44 -05:00
<?php
2014-08-10 11:22:42 -05:00
/**
* Class TestCase
*/
2014-07-03 02:16:17 -05:00
class TestCase extends Illuminate\Foundation\Testing\TestCase
{
2014-06-28 02:41:44 -05:00
2014-07-03 02:16:17 -05:00
/**
* Creates the application.
*
* @return \Symfony\Component\HttpKernel\HttpKernelInterface
2014-08-10 11:22:42 -05:00
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
2014-07-03 02:16:17 -05:00
*/
public function createApplication()
{
2014-08-10 12:02:24 -05:00
/** @noinspection PhpUnusedLocalVariableInspection */
2014-07-03 02:16:17 -05:00
$unitTesting = true;
2014-06-28 02:41:44 -05:00
2014-08-10 12:02:24 -05:00
/** @noinspection PhpUnusedLocalVariableInspection */
2014-07-03 02:16:17 -05:00
$testEnvironment = 'testing';
2014-06-28 02:41:44 -05:00
2014-07-03 02:16:17 -05:00
return require __DIR__ . '/../../bootstrap/start.php';
}
2014-08-10 11:22:42 -05:00
/**
* @param $class
*
* @return \Mockery\MockInterface
*/
2014-07-03 02:16:17 -05:00
public function mock($class)
{
$mock = Mockery::mock($class);
$this->app->instance($class, $mock);
return $mock;
}
2014-06-28 02:41:44 -05:00
}