/** * Тест обработки открывающего тега. * @covers \Epay\Xml::openTag() */ public function testOpenTag() { $reflection = new \ReflectionProperty($this->xml, 'parser'); $reflection->setAccessible(true); $parser = $reflection->getValue($this->xml); $this->xml->openTag($parser, 'test', array('attribute' => 'value')); $reflection = new \ReflectionProperty($this->xml, 'result'); $reflection->setAccessible(true); $result = $reflection->getValue($this->xml); $reflection = new \ReflectionProperty($this->xml, 'currentTag'); $reflection->setAccessible(true); $currentTag = $reflection->getValue($this->xml); $this->assertEquals('test', $currentTag); $this->assertInternalType('array', $result); $this->assertArrayHasKey('TAG_test', $result); $this->assertArrayHasKey('test_attribute', $result); $this->assertEquals('value', $result['test_attribute']); }