/** * When no parameters are passed the formatter is a json formatter * and no data is added. Also the code is 200 and text is OK * * @return null */ public function testDefaultConstructor() { $compositor = $this->template->getViewCompositor(); $this->assertInstanceOf('Appfuel\\View\\Compositor\\JsonCompositor', $compositor); $this->assertEquals(array(), $this->template->getAll()); $this->assertEquals(200, $this->template->getStatusCode()); $this->assertEquals('OK', $this->template->getStatusText()); $expected = '{"code":200,"message":"OK","data":[]}'; $this->assertEquals($expected, $this->template->build()); }
<?php include "config.php"; include "templates/templates.php"; $templates = Template::getAll(); // Find all templates with their own navigation item $navItems = []; $indexPage; foreach ($templates as $index => $template) { if ($template->isNavigation) { $navItems[$index] = $template; } if ($template->isIndex) { $indexPage = $template; } } ?> <!doctype html> <html class="no-js" lang="en-EN"> <head> <meta charset="utf-8"> <base href="/"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <title>Online planning poker</title> <meta name="description" content="Scrumpoker online is a simple web implementation of planning poker for scrum teams to determine the complexity of stories. It aims to integrate ticketing systems like Redmine or JIRA."> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="apple-touch-icon" href="apple-touch-icon.png"> <script src="/js/modernizr-2.8.3.min.js"></script>
echo $navItem["name"]; ?> </a></li> <?php } ?> </ul> </div><!--/.nav-collapse --> </div> </nav> <!-- Add your site or application content here --> <div class="container-fluid main" data-ng-view> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular-route.min.js"></script> <script src="/js/bootstrap.min.js"></script> <script src="/js/plugins.js"></script> <script src="/js/main.js"></script> <!-- Templates of the page --> <?php foreach (Template::getAll() as $template) { $template->toTag(); } ?> </body> </html>