16 $profile = $this->getMockBuilder(
'Twig_Profiler_Profile')->disableOriginalConstructor()->getMock();
18 $profile->expects($this->any())->method(
'isRoot')->will($this->returnValue(
true));
19 $profile->expects($this->any())->method(
'getName')->will($this->returnValue(
'main'));
20 $profile->expects($this->any())->method(
'getDuration')->will($this->returnValue(1));
21 $profile->expects($this->any())->method(
'getMemoryUsage')->will($this->returnValue(0));
22 $profile->expects($this->any())->method(
'getPeakMemoryUsage')->will($this->returnValue(0));
43 $profile->expects($this->any())->method(
'getProfiles')->will($this->returnValue($subProfiles));
44 $profile->expects($this->any())->method(
'getIterator')->will($this->returnValue(
new ArrayIterator($subProfiles)));
51 return $this->
generateProfile(
'main', 1,
true,
'template',
'index.twig', $subProfiles);
56 return $this->
generateProfile(
'body', 0.0001,
false,
'block',
'embedded.twig', $subProfiles);
61 return $this->
generateProfile(
'main', 0.0001,
true,
'template',
'embedded.twig', $subProfiles);
66 return $this->
generateProfile(
'main', 0.0001,
true,
'template',
'included.twig', $subProfiles);
71 return $this->
generateProfile(
'foo', 0.0001,
false,
'macro',
'index.twig', $subProfiles);
86 $profile = $this->getMockBuilder(
'Twig_Profiler_Profile')->disableOriginalConstructor()->getMock();
88 $profile->expects($this->any())->method(
'isRoot')->will($this->returnValue(
false));
89 $profile->expects($this->any())->method(
'getName')->will($this->returnValue(
$name));
90 $profile->expects($this->any())->method(
'getDuration')->will($this->returnValue($duration));
91 $profile->expects($this->any())->method(
'getMemoryUsage')->will($this->returnValue(0));
92 $profile->expects($this->any())->method(
'getPeakMemoryUsage')->will($this->returnValue(0));
93 $profile->expects($this->any())->method(
'isTemplate')->will($this->returnValue($isTemplate));
94 $profile->expects($this->any())->method(
'getType')->will($this->returnValue(
$type));
95 $profile->expects($this->any())->method(
'getTemplate')->will($this->returnValue($templateName));
96 $profile->expects($this->any())->method(
'getProfiles')->will($this->returnValue($subProfiles));
97 $profile->expects($this->any())->method(
'getIterator')->will($this->returnValue(
new ArrayIterator($subProfiles)));
generateProfile($name, $duration, $isTemplate, $type, $templateName, array $subProfiles=array())
getEmbeddedBlockProfile(array $subProfiles=array())
getIndexProfile(array $subProfiles=array())
Create styles array
The data for the language used.
getEmbeddedTemplateProfile(array $subProfiles=array())
getIncludedTemplateProfile(array $subProfiles=array())
getMacroProfile(array $subProfiles=array())