diff --git a/composer.json b/composer.json index 45b1e3a..ad16f80 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ ], "require": { "php": ">=7.0.0", - "fuzeworks/core": "1.1.0", + "fuzeworks/core": "1.1.1", "latte/latte": "2.4.*", "tracy/tracy": "2.4.*", "smarty/smarty": "3.1.*" diff --git a/tests/application/controllers/controller_standardTest.php b/tests/application/controllers/controller_standardTest.php index b737c18..24e86c8 100644 --- a/tests/application/controllers/controller_standardTest.php +++ b/tests/application/controllers/controller_standardTest.php @@ -30,6 +30,7 @@ * @version Version 1.0.0 */ +use PHPUnit\Framework\TestCase; use Application\Controller\Standard; use FuzeWorks\Layout; use FuzeWorks\Factory; @@ -44,11 +45,13 @@ class standardTest extends TestCase { private $controller; + private $factory; public function setUp() { require_once('application/Controller/controller.standard.php'); $this->controller = new Standard(); + $this->factory = Factory::getInstance(); } public function testType() @@ -59,12 +62,12 @@ class standardTest extends TestCase public function testIndex() { // First set a test file ready - Layout::setDirectory(dirname(__FILE__) . '/testIndex/'); + $this->factory->layout->setDirectory(dirname(__FILE__) . '/testIndex/'); // Perform and retrieve the output ob_start(); $this->controller->index(); - Factory::getInstance()->output->_display(); + $this->factory->output->_display(); $output = ob_get_contents(); ob_end_clean(); @@ -73,8 +76,8 @@ class standardTest extends TestCase public function tearDown() { - Layout::reset(); - Factory::getInstance()->output->set_output(''); + $this->factory->layout->reset(); + $this->factory->output->set_output(''); }