protected function printLayout($content)
    {
        ?>
<html>
<head>
    <title><?php 
        echo $this->getTitle();
        ?>
</title>
    <?php 
        echo LayoutModule::getHeadItemsAsHtml();
        ?>
    <?php 
        echo ResourceLoader::getResourceInjectionHtml();
        ?>
    <?php 
        $this->printHead();
        ?>
</head>
<body>
<?php 
        $this->printTop();
        echo LayoutModule::getBodyItemsAsHtml();
        $this->printPageHeading();
        $this->printContent($content);
        $this->printTail();
        ?>
</body>
</html>
    <?php 
    }
 public function testLoadingMultipleScriptsWithSameDependancies()
 {
     ResourceLoader::clearResources();
     ResourceLoader::addScriptCode("doThis();", ["/a.js", "/b.js"]);
     ResourceLoader::addScriptCode("doThat();", ["/a.js", "/b.js"]);
     $scripts = ResourceLoader::getResourceInjectionHtml();
     $this->assertEquals("<script src=\"/client/resource-manager.js\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\">\nwindow.resourceManager.loadResources( [ \"/a.js\", \"/b.js\" ], function()\n{\n\tdoThis();\n\tdoThat();\n} );\n</script>", $scripts);
 }
 public function testLoadingMultipleScriptsWithSameDependancies()
 {
     ResourceLoader::clearResources();
     ResourceLoader::addScriptCode("doThis();", ["/a.js", "/b.js"]);
     ResourceLoader::addScriptCode("doThat();", ["/a.js", "/b.js"]);
     $scripts = ResourceLoader::getResourceInjectionHtml();
     $fileName = "";
     $pathToFile = "resources/resource-manager.js";
     if (file_exists($pathToFile)) {
         $fileName = filemtime($pathToFile);
     }
     $this->assertEquals("<script src=\"/deployed/resources/resource-manager.js?" . $fileName . ".js\" type=\"text/javascript\"></script>\n<script type=\"text/javascript\" src=\"/a.js\"></script>\n<script type=\"text/javascript\" src=\"/b.js\"></script><script type=\"text/javascript\">\n//<![CDATA[\nwindow.resourceManager.runWhenDocumentReady( function()\n{\n\tdoThis();\n\tdoThat();\n} );\n\n//]]>\n</script>", $scripts);
 }