Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update tests for timer setup.

  • Loading branch information...
commit 9692d518f790d5253e8bb915a338a149bbed0bd5 1 parent 9b5a58b
@markstory markstory authored
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'));
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.