/** * template should be loaded for 'foo' because other collectors are * missing in profile or in profiler. */ public function testGetTemplates() { $profile = $this->mockProfile(); $profile->expects($this->any())->method('hasCollector')->will($this->returnCallback(array($this, 'profilerHasCallback'))); $this->profiler->expects($this->any())->method('has')->withAnyParameters()->will($this->returnCallback(array($this, 'profileHasCollectorCallback'))); $result = $this->templateManager->getTemplates($profile); $this->assertArrayHasKey('foo', $result); $this->assertArrayNotHasKey('bar', $result); $this->assertArrayNotHasKey('baz', $result); }