Simplify test setup
This commit is contained in:
parent
4c3b75c3d6
commit
3345ed069f
@ -16,12 +16,10 @@
|
|||||||
|
|
||||||
namespace Aviat\Ion\Tests;
|
namespace Aviat\Ion\Tests;
|
||||||
|
|
||||||
|
use function Aviat\Ion\_dir;
|
||||||
|
|
||||||
use Aura\Web\WebFactory;
|
use Aura\Web\WebFactory;
|
||||||
use Aviat\Ion\Json;
|
use Aviat\Ion\Json;
|
||||||
use GuzzleHttp\Client;
|
|
||||||
use GuzzleHttp\Handler\MockHandler;
|
|
||||||
use GuzzleHttp\HandlerStack;
|
|
||||||
use GuzzleHttp\Psr7\Response;
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use Zend\Diactoros\ServerRequestFactory;
|
use Zend\Diactoros\ServerRequestFactory;
|
||||||
use Zend\Diactoros\Response as HttpResponse;
|
use Zend\Diactoros\Response as HttpResponse;
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
namespace Aviat\Ion\Tests;
|
namespace Aviat\Ion\Tests;
|
||||||
|
|
||||||
|
use function Aviat\Ion\_dir;
|
||||||
|
|
||||||
use Aviat\Ion\{Json, JsonException};
|
use Aviat\Ion\{Json, JsonException};
|
||||||
|
|
||||||
class JsonTest extends Ion_TestCase {
|
class JsonTest extends Ion_TestCase {
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
|
|
||||||
namespace Aviat\Ion\Tests\View;
|
namespace Aviat\Ion\Tests\View;
|
||||||
|
|
||||||
use Aviat\Ion\Tests\TestHtmlView;
|
use function Aviat\Ion\_dir;
|
||||||
|
|
||||||
use function _dir;
|
use Aviat\Ion\Tests\TestHtmlView;
|
||||||
|
|
||||||
class HtmlViewTest extends HttpViewTest {
|
class HtmlViewTest extends HttpViewTest {
|
||||||
|
|
||||||
|
@ -10,30 +10,12 @@ if ($timezone === '' || $timezone === FALSE)
|
|||||||
ini_set('date.timezone', 'GMT');
|
ini_set('date.timezone', 'GMT');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
// Global functions
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Joins paths together. Variadic to take an
|
|
||||||
* arbitrary number of arguments
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function _dir()
|
|
||||||
{
|
|
||||||
return implode(DIRECTORY_SEPARATOR, func_get_args());
|
|
||||||
}
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// Autoloading
|
// Autoloading
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
require 'Ion_TestCase.php';
|
|
||||||
|
|
||||||
// Composer autoload
|
// Composer autoload
|
||||||
require __DIR__ . '/../vendor/autoload.php';
|
require realpath(__DIR__ . '/../vendor/autoload.php');
|
||||||
|
require 'Ion_TestCase.php';
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// Ini Settings
|
// Ini Settings
|
||||||
|
Loading…
Reference in New Issue
Block a user