public function testGetAddProfile() { $profile = new Twig_Profiler_Profile(); $profile->addProfile($a = new Twig_Profiler_Profile()); $profile->addProfile($b = new Twig_Profiler_Profile()); $this->assertSame(array($a, $b), $profile->getProfiles()); $this->assertSame(array($a, $b), iterator_to_array($profile)); }