Ejemplo n.º 1
0
 /**
  * test rendering and ensure that timers are being set.
  *
  * @return void
  */
 public function testRenderTimers()
 {
     $request = new CakeRequest('/posts/index');
     $request->addParams(Router::parse($request->url));
     $request->addPaths(array('webroot' => '/', 'base' => '/', 'here' => '/posts/index'));
     $this->Controller->setRequest($request);
     $this->Controller->viewPath = 'posts';
     $this->Controller->layout = 'default';
     $View = new DebugView($this->Controller, false);
     $View->render('index');
     $result = DebugKitDebugger::getTimers();
     $this->assertEqual(count($result), 4);
     $this->assertTrue(isset($result['viewRender']));
     $this->assertTrue(isset($result['render_default.ctp']));
     $this->assertTrue(isset($result['render_index.ctp']));
     $result = DebugKitDebugger::getMemoryPoints();
     $this->assertTrue(isset($result['View render complete']));
 }