Пример #1
0
    public function testHydrate()
    {
        $axisXml = new \DOMDocument();
        $axisXml->loadXML('
			<Member Hierarchy="Employees2">
                <UName>[Employees].[All Employees]</UName>
                <Caption>All Employees</Caption>
                <LName>[Employees].[(All)]</LName>
                <LNum>0</LNum>
                <DisplayInfo>65537</DisplayInfo>
              </Member>');
        $node = $axisXml->getElementsByTagName('Member')->item(0);
        $cellAxis = new CellAxis();
        $cellAxis->hydrate($node);
        $this->assertEquals($cellAxis->getMemberUniqueName(), '[Employees].[All Employees]');
        $this->assertEquals($cellAxis->getMemberCaption(), 'All Employees');
        $this->assertEquals($cellAxis->getLevelUniqueName(), '[Employees].[(All)]');
        $this->assertEquals($cellAxis->getLevelNumber(), 0);
        $this->assertEquals($cellAxis->getDisplayInfo(), 65537);
        $this->assertEquals($cellAxis->getDimensionName(), 'Employees2');
        $this->assertEquals($cellAxis->getLevelTrueName(), '[Employees2].[(All)]');
        $this->assertEquals($cellAxis->getMemberTrueName(), '[Employees2].[All Employees]');
    }