Skip to content
This repository
Browse code

Update tests for timer setup.

  • Loading branch information...
commit 9692d518f790d5253e8bb915a338a149bbed0bd5 1 parent 9b5a58b
Mark Story authored May 11, 2012
12  Test/Case/Controller/Component/ToolbarComponentTest.php
@@ -203,10 +203,18 @@ public function testConstruct() {
203 203
 
204 204
 		$this->assertFalse(empty($this->Controller->Toolbar->panels));
205 205
 
206  
-		$timers = DebugTimer::getAll();
207  
-		$this->assertTrue(isset($timers['componentInit']));
208 206
 		$memory = DebugMemory::getAll();
209 207
 		$this->assertTrue(isset($memory['Component initialization']));
  208
+
  209
+		$events = $this->Controller->getEventManager();
  210
+		$this->assertNotEmpty($events->listeners('Controller.initialize'));
  211
+		$this->assertNotEmpty($events->listeners('Controller.startup'));
  212
+		$this->assertNotEmpty($events->listeners('Controller.beforeRender'));
  213
+		$this->assertNotEmpty($events->listeners('Controller.shutdown'));
  214
+		$this->assertNotEmpty($events->listeners('View.beforeRender'));
  215
+		$this->assertNotEmpty($events->listeners('View.afterRender'));
  216
+		$this->assertNotEmpty($events->listeners('View.beforeLayout'));
  217
+		$this->assertNotEmpty($events->listeners('View.afterLayout'));
210 218
 	}
211 219
 
212 220
 /**

0 notes on commit 9692d51

Please sign in to comment.
Something went wrong with that request. Please try again.