18 $this->assertEquals(
'template', $profile->getTemplate());
19 $this->assertEquals(
'type', $profile->getType());
20 $this->assertEquals(
'name', $profile->getName());
26 $this->assertTrue($profile->isRoot());
29 $this->assertFalse($profile->isRoot());
35 $this->assertTrue($profile->isTemplate());
38 $this->assertFalse($profile->isTemplate());
44 $this->assertTrue($profile->isBlock());
47 $this->assertFalse($profile->isBlock());
53 $this->assertTrue($profile->isMacro());
56 $this->assertFalse($profile->isMacro());
65 $this->assertSame(array($a, $b), $profile->getProfiles());
66 $this->assertSame(array($a, $b), iterator_to_array($profile));
75 $this->assertTrue($profile->getDuration() > 0, sprintf(
'Expected duration > 0, got: %f', $profile->getDuration()));
82 $profile->addProfile($profile1);
86 $profile2 = unserialize(serialize($profile));
87 $profiles = $profile->getProfiles();
88 $this->assertCount(1, $profiles);
89 $profile3 = $profiles[0];
91 $this->assertEquals($profile->getTemplate(), $profile2->getTemplate());
92 $this->assertEquals($profile->getType(), $profile2->getType());
93 $this->assertEquals($profile->getName(), $profile2->getName());
94 $this->assertEquals($profile->getDuration(), $profile2->getDuration());
96 $this->assertEquals($profile1->getTemplate(), $profile3->getTemplate());
97 $this->assertEquals($profile1->getType(), $profile3->getType());
98 $this->assertEquals($profile1->getName(), $profile3->getName());
108 $this->assertEquals(0, $profile->getDuration());