From 457987e2f127d48c95c4a68eb7e2763994980296 Mon Sep 17 00:00:00 2001 From: Abel Hoogeveen Date: Thu, 14 Sep 2017 14:45:02 +0200 Subject: [PATCH] Rewritten the Layout system to use 'layout.' files instead of 'view.' files. - All systems have been rewritten to use this new scheme. --- src/Database/DB_driver.php | 2 +- src/FuzeWorks/DatabaseTracyBridge.php | 4 +-- ...tLoadViewEvent.php => LayoutLoadEvent.php} | 10 +++--- src/FuzeWorks/Layout.php | 34 +++++++++---------- src/FuzeWorks/Logger.php | 22 ++++++------ src/FuzeWorks/LoggerTracyBridge.php | 4 +-- src/FuzeWorks/Output.php | 2 +- src/FuzeWorks/TemplateEngine/LatteEngine.php | 2 +- .../TemplateEngine/TemplateEngine.php | 2 +- .../layout.logger_cli.php} | 0 .../layout.logger_default.php} | 0 .../layout.tracydatabasepanel.php} | 0 .../layout.tracydatabasetab.php} | 0 .../layout.tracyloggerpanel.php} | 0 .../layout.tracyloggertab.php} | 0 .../view.home.php => Layout/layout.home.php} | 0 tests/core/core_layoutTest.php | 16 ++++----- ...Test.php => event_layoutLoadEventTest.php} | 20 +++++------ .../testCustomEngine/layout.test.test} | 0 .../layout.json.json} | 0 .../{view.php.php => layout.php.php} | 0 .../{view.smarty.tpl => layout.smarty.tpl} | 0 .../{view.json.json => layout.json.json} | 0 .../{view.php.php => layout.php.php} | 0 .../{view.smarty.tpl => layout.smarty.tpl} | 0 .../Deeper/layout.test.php} | 0 .../view.test.php => layout.JSON.json} | 0 .../{view.JSON.json => layout.test.php} | 0 .../{view.test.php => layout.test.php} | 0 .../layout.test.json} | 0 .../layout.test.unknown} | 0 .../view.test.unknown | 0 32 files changed, 59 insertions(+), 59 deletions(-) rename src/FuzeWorks/Event/{LayoutLoadViewEvent.php => LayoutLoadEvent.php} (87%) rename src/{Views/view.logger_cli.php => Layout/layout.logger_cli.php} (100%) rename src/{Views/view.logger_default.php => Layout/layout.logger_default.php} (100%) rename src/{Views/view.tracydatabasepanel.php => Layout/layout.tracydatabasepanel.php} (100%) rename src/{Views/view.tracydatabasetab.php => Layout/layout.tracydatabasetab.php} (100%) rename src/{Views/view.tracyloggerpanel.php => Layout/layout.tracyloggerpanel.php} (100%) rename src/{Views/view.tracyloggertab.php => Layout/layout.tracyloggertab.php} (100%) rename tests/application/{Views/view.home.php => Layout/layout.home.php} (100%) rename tests/events/{event_layoutLoadViewEventTest.php => event_layoutLoadEventTest.php} (83%) rename tests/{application/Views/put_views_here => layout/testCustomEngine/layout.test.test} (100%) rename tests/layout/{testCustomEngine/view.test.test => testEngineVariables/layout.json.json} (100%) rename tests/layout/testEngineVariables/{view.php.php => layout.php.php} (100%) rename tests/layout/testEngineVariables/{view.smarty.tpl => layout.smarty.tpl} (100%) rename tests/layout/testEngines/{view.json.json => layout.json.json} (100%) rename tests/layout/testEngines/{view.php.php => layout.php.php} (100%) rename tests/layout/testEngines/{view.smarty.tpl => layout.smarty.tpl} (100%) rename tests/layout/{testEngineVariables/view.json.json => testGetFilePath/Deeper/layout.test.php} (100%) rename tests/layout/testGetFilePath/{Deeper/view.test.php => layout.JSON.json} (100%) rename tests/layout/testGetFilePath/{view.JSON.json => layout.test.php} (100%) rename tests/layout/testLayoutGet/{view.test.php => layout.test.php} (100%) rename tests/layout/{testGetFilePath/view.test.php => testMissingFile/layout.test.json} (100%) rename tests/layout/{testMissingFile/view.test.json => testUnknownFileExtension/layout.test.unknown} (100%) delete mode 100644 tests/layout/testUnknownFileExtension/view.test.unknown diff --git a/src/Database/DB_driver.php b/src/Database/DB_driver.php index ab15243..2391367 100644 --- a/src/Database/DB_driver.php +++ b/src/Database/DB_driver.php @@ -1744,7 +1744,7 @@ abstract class FW_DB_driver { * @param string the error message * @param string any "swap" values * @param bool whether to localize the message - * @return string sends the application/views/errors/error_db.php template + * @return string sends the application/layout/errors/error_db.php template */ public function display_error($error = '', $swap = '', $native = FALSE) { diff --git a/src/FuzeWorks/DatabaseTracyBridge.php b/src/FuzeWorks/DatabaseTracyBridge.php index 5db5a6a..3d337dd 100644 --- a/src/FuzeWorks/DatabaseTracyBridge.php +++ b/src/FuzeWorks/DatabaseTracyBridge.php @@ -127,7 +127,7 @@ class DatabaseTracyBridge implements IBarPanel { $results = $this->getResults(); ob_start(function () {}); - require dirname(__DIR__) . '/Views/view.tracydatabasetab.php'; + require dirname(__DIR__) . '/Layout/layout.tracydatabasetab.php'; return ob_get_clean(); } @@ -136,7 +136,7 @@ class DatabaseTracyBridge implements IBarPanel // Parse the panel $results = $this->getResults(); ob_start(function () {}); - require dirname(__DIR__) . '/Views/view.tracydatabasepanel.php'; + require dirname(__DIR__) . '/Layout/layout.tracydatabasepanel.php'; return ob_get_clean(); } } \ No newline at end of file diff --git a/src/FuzeWorks/Event/LayoutLoadViewEvent.php b/src/FuzeWorks/Event/LayoutLoadEvent.php similarity index 87% rename from src/FuzeWorks/Event/LayoutLoadViewEvent.php rename to src/FuzeWorks/Event/LayoutLoadEvent.php index e902e19..b6c7fcf 100644 --- a/src/FuzeWorks/Event/LayoutLoadViewEvent.php +++ b/src/FuzeWorks/Event/LayoutLoadEvent.php @@ -35,24 +35,24 @@ namespace FuzeWorks\Event; use FuzeWorks\Event; /** - * Event that gets loaded when a view is loaded. + * Event that gets loaded when a layout is loaded. * - * Use this to cancel the loading of a view, or change the file or engine of a view + * Use this to cancel the loading of a layout, or change the file or engine of a layout * * @author Abel Hoogeveen * @copyright Copyright (c) 2013 - 2016, Techfuze. (http://techfuze.net) */ -class LayoutLoadViewEvent extends Event +class LayoutLoadEvent extends Event { /** - * The directory of the view to be loaded. + * The directory of the layout to be loaded. * * @var string */ public $directory; /** - * The file of the view to be loaded. + * The file of the layout to be loaded. * * @var string */ diff --git a/src/FuzeWorks/Layout.php b/src/FuzeWorks/Layout.php index 3e8d61e..af33479 100644 --- a/src/FuzeWorks/Layout.php +++ b/src/FuzeWorks/Layout.php @@ -98,14 +98,14 @@ class Layout public function init() { - $this->directory = Core::$appDir . DS .'Views'; + $this->directory = Core::$appDir . DS .'Layout'; } /** * Retrieve a template file using a string and a directory and immediatly parse it to the output class. * * What template file gets loaded depends on the template engine that is being used. - * PHP for example uses .php files. Providing this function with 'home/dashboard' will load the home/view.dashboard.php file. + * PHP for example uses .php files. Providing this function with 'home/dashboard' will load the home/layout.dashboard.php file. * You can also provide no particular engine, and the manager will decide what template to load. * Remember that doing so will result in a LayoutException when multiple compatible files are found. * @@ -115,7 +115,7 @@ class Layout * * @throws LayoutException On error */ - public function view($file, $directory = null, $directOutput = false) + public function display($file, $directory = null, $directOutput = false) { $output = Factory::getInstance()->output; $directory = (is_null($directory) ? $this->directory : $directory); @@ -136,7 +136,7 @@ class Layout * Retrieve a template file using a string and a directory. * * What template file gets loaded depends on the template engine that is being used. - * PHP for example uses .php files. Providing this function with 'home/dashboard' will load the home/view.dashboard.php file. + * PHP for example uses .php files. Providing this function with 'home/dashboard' will load the home/layout.dashboard.php file. * You can also provide no particular engine, and the manager will decide what template to load. * Remember that doing so will result in a LayoutException when multiple compatible files are found. * @@ -177,7 +177,7 @@ class Layout $this->current_engine->setDirectory($this->directory); // And run an Event to see what other parts have to say about it - $event = Events::fireEvent('layoutLoadViewEvent', $this->file, $this->directory, $this->current_engine, $this->assigned_variables); + $event = Events::fireEvent('layoutLoadEvent', $this->file, $this->directory, $this->current_engine, $this->assigned_variables); // The event has been cancelled if ($event->isCancelled()) { @@ -227,7 +227,7 @@ class Layout } /** - * Converts a view string to a file using the directory and the used extensions. + * Converts a layout string to a file using the directory and the used extensions. * * It will detect whether the file exists and choose a file according to the provided extensions * @@ -253,30 +253,30 @@ class Layout } // Set the file name and location - $viewSelector = explode('/', $string); - if (count($viewSelector) == 1) { - $viewSelector = 'view.'.$viewSelector[0]; + $layoutSelector = explode('/', $string); + if (count($layoutSelector) == 1) { + $layoutSelector = 'layout.'.$layoutSelector[0]; } else { // Get last file - $file = end($viewSelector); + $file = end($layoutSelector); // Reset to start - reset($viewSelector); + reset($layoutSelector); // Remove last value - array_pop($viewSelector); + array_pop($layoutSelector); - $viewSelector[] = 'view.'.$file; + $layoutSelector[] = 'layout.'.$file; // And create the final value - $viewSelector = implode('/', $viewSelector); + $layoutSelector = implode('/', $layoutSelector); } // Then try and select a file $fileSelected = false; $selectedFile = null; foreach ($extensions as $extension) { - $file = $directory.$viewSelector.'.'.strtolower($extension); + $file = $directory.$layoutSelector.'.'.strtolower($extension); $file = preg_replace('#/+#', '/', $file); if (file_exists($file) && !$fileSelected) { $selectedFile = $file; @@ -296,7 +296,7 @@ class Layout } /** - * Converts a view string to a file using the directory and the used extensions. + * Converts a layout string to a file using the directory and the used extensions. * It also sets the file variable of this class. * * It will detect whether the file exists and choose a file according to the provided extensions @@ -527,7 +527,7 @@ class Layout $this->current_engine = null; $this->assigned_variables = array(); - $this->directory = Core::$appDir . DS . 'Views'; + $this->directory = Core::$appDir . DS . 'Layout'; Logger::log('Reset the layout manager to its default state'); } } \ No newline at end of file diff --git a/src/FuzeWorks/Logger.php b/src/FuzeWorks/Logger.php index be842e2..20e33d8 100644 --- a/src/FuzeWorks/Logger.php +++ b/src/FuzeWorks/Logger.php @@ -244,7 +244,7 @@ class Logger { } $logs = self::$Logs; - require(dirname(__DIR__) . '/Views/view.' . self::$logger_template . '.php'); + require(dirname(__DIR__) . '/Layout/layout.' . self::$logger_template . '.php'); } /** @@ -255,7 +255,7 @@ class Logger { { ob_start(function () {}); $logs = self::$Logs; - require(dirname(__DIR__) . '/Views/view.logger_cli.php'); + require(dirname(__DIR__) . '/Layout/layout.logger_cli.php'); $contents = ob_get_clean(); $file = Core::$logDir .DS. 'Logs'.DS.'log_latest.php'; if (is_writable($file)) @@ -463,9 +463,9 @@ class Logger { * Calls an HTTP error, sends it as a header, and loads a template if required to do so. * * @param int $errno HTTP error code - * @param bool $view true to view error on website + * @param bool $layout true to layout error on website */ - public static function http_error($errno = 500, $view = true) { + public static function http_error($errno = 500, $layout = true) { $http_codes = array( 400 => 'Bad Request', 401 => 'Unauthorized', @@ -506,20 +506,20 @@ class Logger { self::log('Sending header HTTP/1.1 ' . $errno . ' ' . $http_codes[$errno]); header('HTTP/1.1 ' . $errno . ' ' . $http_codes[$errno]); - // Do we want the error-view with it? - if ($view == false) { + // Do we want the error-layout with it? + if ($layout == false) { return; } - // Load the view - $view = 'errors/' . $errno; - self::log('Loading view ' . $view); + // Load the layout + $layout = 'errors/' . $errno; + self::log('Loading layout ' . $layout); - // Try and load the view, if impossible, load HTTP code instead. + // Try and load the layout, if impossible, load HTTP code instead. $factory = Factory::getInstance(); try { $factory->Layout->reset(); - $factory->Layout->view($view); + $factory->Layout->display($layout); } catch (LayoutException $exception) { // No error page could be found, just echo the result $factory->output->set_output("

$errno

" . $http_codes[$errno] . '

'); diff --git a/src/FuzeWorks/LoggerTracyBridge.php b/src/FuzeWorks/LoggerTracyBridge.php index dce058e..0e1e876 100644 --- a/src/FuzeWorks/LoggerTracyBridge.php +++ b/src/FuzeWorks/LoggerTracyBridge.php @@ -73,7 +73,7 @@ class LoggerTracyBridge implements IBarPanel { public function getTab() { ob_start(function () {}); - require dirname(__DIR__) . '/Views/view.tracyloggertab.php'; + require dirname(__DIR__) . '/Layout/layout.tracyloggertab.php'; return ob_get_clean(); } @@ -101,7 +101,7 @@ class LoggerTracyBridge implements IBarPanel { // Parse the panel ob_start(function () {}); - require dirname(__DIR__) . '/Views/view.tracyloggerpanel.php'; + require dirname(__DIR__) . '/Layout/layout.tracyloggerpanel.php'; return ob_get_clean(); } diff --git a/src/FuzeWorks/Output.php b/src/FuzeWorks/Output.php index fc3075b..39c82c1 100644 --- a/src/FuzeWorks/Output.php +++ b/src/FuzeWorks/Output.php @@ -395,7 +395,7 @@ class Output { * with any server headers and profile data. It also stops benchmark * timers so the page rendering speed and memory usage can be shown. * - * Note: All "view" data is automatically put into $this->final_output + * Note: All "layout" data is automatically put into $this->final_output * by controller class. * * @uses Output::$final_output diff --git a/src/FuzeWorks/TemplateEngine/LatteEngine.php b/src/FuzeWorks/TemplateEngine/LatteEngine.php index 3c6e3ce..3d236e7 100644 --- a/src/FuzeWorks/TemplateEngine/LatteEngine.php +++ b/src/FuzeWorks/TemplateEngine/LatteEngine.php @@ -75,7 +75,7 @@ class LatteEngine implements TemplateEngine * Handle and retrieve a template file. * * @param string $file Template File - * @param array $assigned_variables All the variables used in this view + * @param array $assigned_variables All the variables used in this layout * * @return string Output of the template */ diff --git a/src/FuzeWorks/TemplateEngine/TemplateEngine.php b/src/FuzeWorks/TemplateEngine/TemplateEngine.php index f038c9b..58e140e 100644 --- a/src/FuzeWorks/TemplateEngine/TemplateEngine.php +++ b/src/FuzeWorks/TemplateEngine/TemplateEngine.php @@ -51,7 +51,7 @@ interface TemplateEngine * Handle and retrieve a template file. * * @param string $file Template File - * @param array $assigned_variables All the variables used in this view + * @param array $assigned_variables All the variables used in this layout * * @return string Output of the template */ diff --git a/src/Views/view.logger_cli.php b/src/Layout/layout.logger_cli.php similarity index 100% rename from src/Views/view.logger_cli.php rename to src/Layout/layout.logger_cli.php diff --git a/src/Views/view.logger_default.php b/src/Layout/layout.logger_default.php similarity index 100% rename from src/Views/view.logger_default.php rename to src/Layout/layout.logger_default.php diff --git a/src/Views/view.tracydatabasepanel.php b/src/Layout/layout.tracydatabasepanel.php similarity index 100% rename from src/Views/view.tracydatabasepanel.php rename to src/Layout/layout.tracydatabasepanel.php diff --git a/src/Views/view.tracydatabasetab.php b/src/Layout/layout.tracydatabasetab.php similarity index 100% rename from src/Views/view.tracydatabasetab.php rename to src/Layout/layout.tracydatabasetab.php diff --git a/src/Views/view.tracyloggerpanel.php b/src/Layout/layout.tracyloggerpanel.php similarity index 100% rename from src/Views/view.tracyloggerpanel.php rename to src/Layout/layout.tracyloggerpanel.php diff --git a/src/Views/view.tracyloggertab.php b/src/Layout/layout.tracyloggertab.php similarity index 100% rename from src/Views/view.tracyloggertab.php rename to src/Layout/layout.tracyloggertab.php diff --git a/tests/application/Views/view.home.php b/tests/application/Layout/layout.home.php similarity index 100% rename from tests/application/Views/view.home.php rename to tests/application/Layout/layout.home.php diff --git a/tests/core/core_layoutTest.php b/tests/core/core_layoutTest.php index 8a5ab13..d2bfa27 100644 --- a/tests/core/core_layoutTest.php +++ b/tests/core/core_layoutTest.php @@ -66,17 +66,17 @@ class layoutTest extends CoreTestAbstract // Basic path $this->factory->layout->setFileFromString('test', 'tests/layout/testGetFilePath/', $extensions); - $this->assertEquals('tests/layout/testGetFilePath/view.test.php', $this->factory->layout->getFile()); + $this->assertEquals('tests/layout/testGetFilePath/layout.test.php', $this->factory->layout->getFile()); $this->assertEquals('tests/layout/testGetFilePath/', $this->factory->layout->getDirectory()); // Alternate file extension $this->factory->layout->setFileFromString('JSON', 'tests/layout/testGetFilePath/', $extensions); - $this->assertEquals('tests/layout/testGetFilePath/view.JSON.json', $this->factory->layout->getFile()); + $this->assertEquals('tests/layout/testGetFilePath/layout.JSON.json', $this->factory->layout->getFile()); $this->assertEquals('tests/layout/testGetFilePath/', $this->factory->layout->getDirectory()); // Complex deeper path $this->factory->layout->setFileFromString('Deeper/test', 'tests/layout/testGetFilePath/', $extensions); - $this->assertEquals('tests/layout/testGetFilePath/Deeper/view.test.php', $this->factory->layout->getFile()); + $this->assertEquals('tests/layout/testGetFilePath/Deeper/layout.test.php', $this->factory->layout->getFile()); $this->assertEquals('tests/layout/testGetFilePath/', $this->factory->layout->getDirectory()); } @@ -125,13 +125,13 @@ class layoutTest extends CoreTestAbstract $this->assertEquals('Retrieved Data', $this->factory->layout->get('test', $directory)); } - public function testLayoutView() + public function testLayoutDisplay() { // Directory of these tests $directory = 'tests/layout/testLayoutGet/'; ob_start(); - $this->factory->layout->view('test', $directory); + $this->factory->layout->display('test', $directory); Factory::getInstance()->output->_display(); $output = ob_get_contents(); ob_end_clean(); @@ -154,7 +154,7 @@ class layoutTest extends CoreTestAbstract // Test for default values $this->assertFalse($this->factory->layout->getTitle()); - $this->assertTrue(strpos($this->factory->layout->getDirectory(), 'application/Views') !== false); + $this->assertTrue(strpos($this->factory->layout->getDirectory(), 'application/Layout') !== false); } public function testGetEngineFromExtension() @@ -188,7 +188,7 @@ class layoutTest extends CoreTestAbstract $mock->method('get')->willReturn('output'); // And listen for usage - $mock->expects($this->once())->method('get')->with('tests/layout/testCustomEngine/view.test.test'); + $mock->expects($this->once())->method('get')->with('tests/layout/testCustomEngine/layout.test.test'); // Register the engine $this->factory->layout->registerEngine($mock, 'Custom', array('test')); @@ -209,7 +209,7 @@ class layoutTest extends CoreTestAbstract $this->factory->layout->registerEngine($mock, 'Custom', array('test')); } - public function testEnginesLoadView() + public function testEnginesLoadLayout() { // Directory of these tests $directory = 'tests/layout/testEngines/'; diff --git a/tests/events/event_layoutLoadViewEventTest.php b/tests/events/event_layoutLoadEventTest.php similarity index 83% rename from tests/events/event_layoutLoadViewEventTest.php rename to tests/events/event_layoutLoadEventTest.php index f19e721..95d0773 100644 --- a/tests/events/event_layoutLoadViewEventTest.php +++ b/tests/events/event_layoutLoadEventTest.php @@ -34,9 +34,9 @@ use FuzeWorks\Factory; use FuzeWorks\EventPriority; /** - * Class LayoutLoadViewEventTest. + * Class LayoutLoadEventTest. */ -class layoutLoadViewEventTest extends CoreTestAbstract +class layoutLoadEventTest extends CoreTestAbstract { protected $factory; @@ -52,10 +52,10 @@ class layoutLoadViewEventTest extends CoreTestAbstract */ public function test_basic() { - $mock = $this->getMockBuilder(MockLayoutViewEventTest::class)->setMethods(['mockMethod'])->getMock(); + $mock = $this->getMockBuilder(MockLayoutEventTest::class)->setMethods(['mockMethod'])->getMock(); $mock->expects($this->once())->method('mockMethod'); - Events::addListener(array($mock, 'mockMethod'), 'layoutLoadViewEvent', EventPriority::NORMAL); + Events::addListener(array($mock, 'mockMethod'), 'layoutLoadEvent', EventPriority::NORMAL); // And run the test $this->factory->layout->get('home'); @@ -68,7 +68,7 @@ class layoutLoadViewEventTest extends CoreTestAbstract */ public function test_change() { - Events::addListener(array($this, 'listener_change'), 'layoutLoadViewEvent', EventPriority::NORMAL); + Events::addListener(array($this, 'listener_change'), 'layoutLoadEvent', EventPriority::NORMAL); $this->factory->layout->get('home'); } @@ -77,11 +77,11 @@ class layoutLoadViewEventTest extends CoreTestAbstract { // This controller should not exist - $this->assertTrue(strpos($event->file, 'application/Views/view.home.php') !== false); - $this->assertTrue(strpos($event->directory, 'application/Views/') !== false); + $this->assertTrue(strpos($event->file, 'application/Layout/layout.home.php') !== false); + $this->assertTrue(strpos($event->directory, 'application/Layout/') !== false); // It should exist now - $event->file = $event->directory . 'view.test.not_found'; + $event->file = $event->directory . 'layout.test.not_found'; return $event; } @@ -93,7 +93,7 @@ class layoutLoadViewEventTest extends CoreTestAbstract { // Listen for the event and cancel it - Events::addListener(array($this, 'listener_cancel'), 'layoutLoadViewEvent', EventPriority::NORMAL); + Events::addListener(array($this, 'listener_cancel'), 'layoutLoadEvent', EventPriority::NORMAL); $this->assertFalse($this->factory->layout->get('home')); } @@ -104,6 +104,6 @@ class layoutLoadViewEventTest extends CoreTestAbstract } } -class MockLayoutViewEventTest { +class MockLayoutEventTest { public function MockMethod() {} } diff --git a/tests/application/Views/put_views_here b/tests/layout/testCustomEngine/layout.test.test similarity index 100% rename from tests/application/Views/put_views_here rename to tests/layout/testCustomEngine/layout.test.test diff --git a/tests/layout/testCustomEngine/view.test.test b/tests/layout/testEngineVariables/layout.json.json similarity index 100% rename from tests/layout/testCustomEngine/view.test.test rename to tests/layout/testEngineVariables/layout.json.json diff --git a/tests/layout/testEngineVariables/view.php.php b/tests/layout/testEngineVariables/layout.php.php similarity index 100% rename from tests/layout/testEngineVariables/view.php.php rename to tests/layout/testEngineVariables/layout.php.php diff --git a/tests/layout/testEngineVariables/view.smarty.tpl b/tests/layout/testEngineVariables/layout.smarty.tpl similarity index 100% rename from tests/layout/testEngineVariables/view.smarty.tpl rename to tests/layout/testEngineVariables/layout.smarty.tpl diff --git a/tests/layout/testEngines/view.json.json b/tests/layout/testEngines/layout.json.json similarity index 100% rename from tests/layout/testEngines/view.json.json rename to tests/layout/testEngines/layout.json.json diff --git a/tests/layout/testEngines/view.php.php b/tests/layout/testEngines/layout.php.php similarity index 100% rename from tests/layout/testEngines/view.php.php rename to tests/layout/testEngines/layout.php.php diff --git a/tests/layout/testEngines/view.smarty.tpl b/tests/layout/testEngines/layout.smarty.tpl similarity index 100% rename from tests/layout/testEngines/view.smarty.tpl rename to tests/layout/testEngines/layout.smarty.tpl diff --git a/tests/layout/testEngineVariables/view.json.json b/tests/layout/testGetFilePath/Deeper/layout.test.php similarity index 100% rename from tests/layout/testEngineVariables/view.json.json rename to tests/layout/testGetFilePath/Deeper/layout.test.php diff --git a/tests/layout/testGetFilePath/Deeper/view.test.php b/tests/layout/testGetFilePath/layout.JSON.json similarity index 100% rename from tests/layout/testGetFilePath/Deeper/view.test.php rename to tests/layout/testGetFilePath/layout.JSON.json diff --git a/tests/layout/testGetFilePath/view.JSON.json b/tests/layout/testGetFilePath/layout.test.php similarity index 100% rename from tests/layout/testGetFilePath/view.JSON.json rename to tests/layout/testGetFilePath/layout.test.php diff --git a/tests/layout/testLayoutGet/view.test.php b/tests/layout/testLayoutGet/layout.test.php similarity index 100% rename from tests/layout/testLayoutGet/view.test.php rename to tests/layout/testLayoutGet/layout.test.php diff --git a/tests/layout/testGetFilePath/view.test.php b/tests/layout/testMissingFile/layout.test.json similarity index 100% rename from tests/layout/testGetFilePath/view.test.php rename to tests/layout/testMissingFile/layout.test.json diff --git a/tests/layout/testMissingFile/view.test.json b/tests/layout/testUnknownFileExtension/layout.test.unknown similarity index 100% rename from tests/layout/testMissingFile/view.test.json rename to tests/layout/testUnknownFileExtension/layout.test.unknown diff --git a/tests/layout/testUnknownFileExtension/view.test.unknown b/tests/layout/testUnknownFileExtension/view.test.unknown deleted file mode 100644 index e69de29..0000000