public function testGetElementsByName()
 {
     $e1 = new HTML_QuickForm2_ElementImpl2('foo');
     $e2 = new HTML_QuickForm2_ElementImpl2('bar');
     $e3 = new HTML_QuickForm2_ElementImpl2('foo');
     $e4 = new HTML_QuickForm2_ElementImpl2('baz');
     $e5 = new HTML_QuickForm2_ElementImpl2('foo');
     $c1 = new HTML_QuickForm2_ContainerImpl('fooContainer1');
     $c2 = new HTML_QuickForm2_ContainerImpl('fooContainer2');
     $c1->appendChild($e1);
     $c1->appendChild($e2);
     $c1->appendChild($e3);
     $c2->appendChild($e4);
     $c2->appendChild($e5);
     $c2->appendChild($c1);
     $this->assertEquals(array($e1, $e3), $c1->getElementsByName('foo'));
     $this->assertEquals(array($e5, $e1, $e3), $c2->getElementsByName('foo'));
 }