protected function Twig_Tests_Profiler_Dumper_AbstractTest::getProfile in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/AbstractTest.php \Twig_Tests_Profiler_Dumper_AbstractTest::getProfile()
3 calls to Twig_Tests_Profiler_Dumper_AbstractTest::getProfile()
- Twig_Tests_Profiler_Dumper_BlackfireTest::testDump in vendor/
twig/ twig/ test/ Twig/ Tests/ Profiler/ Dumper/ BlackfireTest.php - Twig_Tests_Profiler_Dumper_HtmlTest::testDump in vendor/
twig/ twig/ test/ Twig/ Tests/ Profiler/ Dumper/ HtmlTest.php - Twig_Tests_Profiler_Dumper_TextTest::testDump in vendor/
twig/ twig/ test/ Twig/ Tests/ Profiler/ Dumper/ TextTest.php
File
- vendor/
twig/ twig/ test/ Twig/ Tests/ Profiler/ Dumper/ AbstractTest.php, line 14
Class
Code
protected function getProfile() {
$profile = $this
->getMockBuilder('Twig_Profiler_Profile')
->disableOriginalConstructor()
->getMock();
$profile
->expects($this
->any())
->method('isRoot')
->will($this
->returnValue(true));
$profile
->expects($this
->any())
->method('getName')
->will($this
->returnValue('main'));
$profile
->expects($this
->any())
->method('getDuration')
->will($this
->returnValue(1));
$profile
->expects($this
->any())
->method('getMemoryUsage')
->will($this
->returnValue(0));
$profile
->expects($this
->any())
->method('getPeakMemoryUsage')
->will($this
->returnValue(0));
$subProfiles = array(
$this
->getIndexProfile(array(
$this
->getEmbeddedBlockProfile(),
$this
->getEmbeddedTemplateProfile(array(
$this
->getIncludedTemplateProfile(),
)),
$this
->getMacroProfile(),
$this
->getEmbeddedTemplateProfile(array(
$this
->getIncludedTemplateProfile(),
)),
)),
);
$profile
->expects($this
->any())
->method('getProfiles')
->will($this
->returnValue($subProfiles));
$profile
->expects($this
->any())
->method('getIterator')
->will($this
->returnValue(new ArrayIterator($subProfiles)));
return $profile;
}