Permalink
Browse files

Update tests for timer setup.

  • Loading branch information...
1 parent 9b5a58b commit 9692d518f790d5253e8bb915a338a149bbed0bd5 @markstory markstory committed May 12, 2012
Showing with 10 additions and 2 deletions.
  1. +10 −2 Test/Case/Controller/Component/ToolbarComponentTest.php
View
12 Test/Case/Controller/Component/ToolbarComponentTest.php
@@ -203,10 +203,18 @@ public function testConstruct() {
$this->assertFalse(empty($this->Controller->Toolbar->panels));
- $timers = DebugTimer::getAll();
- $this->assertTrue(isset($timers['componentInit']));
$memory = DebugMemory::getAll();
$this->assertTrue(isset($memory['Component initialization']));
+
+ $events = $this->Controller->getEventManager();
+ $this->assertNotEmpty($events->listeners('Controller.initialize'));
+ $this->assertNotEmpty($events->listeners('Controller.startup'));
+ $this->assertNotEmpty($events->listeners('Controller.beforeRender'));
+ $this->assertNotEmpty($events->listeners('Controller.shutdown'));
+ $this->assertNotEmpty($events->listeners('View.beforeRender'));
+ $this->assertNotEmpty($events->listeners('View.afterRender'));
+ $this->assertNotEmpty($events->listeners('View.beforeLayout'));
+ $this->assertNotEmpty($events->listeners('View.afterLayout'));
}
/**

0 comments on commit 9692d51

Please sign in to comment.