/** * @covers Opt_Xml_Buffer::copyBuffer */ public function testCopyBufferExisting() { $this->_obj->addAfter(Opt_Xml_Buffer::TAG_BEFORE, 'foo'); $obj2 = new Opt_Xml_Element('opt:foo'); $obj2->addAfter(Opt_Xml_Buffer::TAG_AFTER, 'bar'); $obj2->copyBuffer($this->_obj, Opt_Xml_Buffer::TAG_BEFORE, Opt_Xml_Buffer::TAG_AFTER); $buf1 = $obj2->getBuffer(Opt_Xml_Buffer::TAG_AFTER); $this->assertEquals(array('foo', 'bar'), $buf1); }