public function testHydrateMin()
    {
        $connection = $this->createConnection();
        $resultSoap = '<root>
					<row>
						<CATALOG_NAME>FoodMart</CATALOG_NAME>
						<SCHEMA_NAME>FoodMart</SCHEMA_NAME>
						<CUBE_NAME>Sales</CUBE_NAME>
						<DIMENSION_NAME>Time</DIMENSION_NAME>
						<DIMENSION_UNIQUE_NAME>[Time]</DIMENSION_UNIQUE_NAME>

					</row>
				</root>';
        $document = new \DOMDocument();
        $document->loadXML($resultSoap);
        $node = $document->getElementsByTagName('row')->item(0);
        $dimension = new Dimension();
        $dimension->hydrate($node, $connection);
        $hierarchies1 = $dimension->getHierarchies();
        $hierarchies2 = $dimension->getHierarchies();
        $hierarchy1 = array_shift($hierarchies1);
        $hierarchy2 = array_shift($hierarchies2);
        $this->assertEquals($dimension->getConnection(), $connection);
        $this->assertEquals($dimension->getCubeName(), 'Sales');
        $this->assertEquals($dimension->getName(), 'Time');
        $this->assertEquals($dimension->getUniqueName(), '[Time]');
        $this->assertEquals($dimension->getDescription(), null);
        $this->assertEquals($dimension->getCaption(), null);
        $this->assertEquals($dimension->getOrdinal(), 0);
        $this->assertEquals($dimension->getType(), 'UNKNOWN');
        $this->assertEquals($dimension->getCardinality(), 0);
        $this->assertEquals($dimension->getDefaultHierarchyUniqueName(), null);
        $this->assertEquals($dimension->isVirtual(), false);
        $this->assertEquals($dimension->isReadWrite(), false);
        $this->assertEquals($dimension->getUniqueSettings(), null);
        $this->assertEquals($dimension->isVisible(), false);
        $this->assertEquals($hierarchy1->getName(), 'h1');
        $this->assertEquals($hierarchy2->getName(), 'h1');
    }
    public function testHydrateMin()
    {
        $resultSoap = '<root>
					<row>
						<CATALOG_NAME>FoodMart</CATALOG_NAME>
						<SCHEMA_NAME>FoodMart</SCHEMA_NAME>
						<CUBE_NAME>Sales</CUBE_NAME>
						<DIMENSION_NAME>Time</DIMENSION_NAME>
						<DIMENSION_UNIQUE_NAME>[Time]</DIMENSION_UNIQUE_NAME>

					</row>
				</root>';
        $document = new \DOMDocument();
        $document->loadXML($resultSoap);
        $node = $document->getElementsByTagName('row')->item(0);
        $connection = $this->getMock('phpOlap\\Xmla\\Connection\\Connection', array(), array(), '', FALSE);
        $connection->expects($this->any())->method('findHierarchies')->will($this->onConsecutiveCalls('h1', 'h2'));
        $dimension = new Dimension();
        $dimension->hydrate($node, $connection);
        $this->assertEquals($dimension->getConnection(), $connection);
        $this->assertEquals($dimension->getCubeName(), 'Sales');
        $this->assertEquals($dimension->getName(), 'Time');
        $this->assertEquals($dimension->getUniqueName(), '[Time]');
        $this->assertEquals($dimension->getDescription(), null);
        $this->assertEquals($dimension->getCaption(), null);
        $this->assertEquals($dimension->getOrdinal(), 0);
        $this->assertEquals($dimension->getType(), 'UNKNOWN');
        $this->assertEquals($dimension->getCardinality(), 0);
        $this->assertEquals($dimension->getDefaultHierarchyUniqueName(), null);
        $this->assertEquals($dimension->isVirtual(), false);
        $this->assertEquals($dimension->isReadWrite(), false);
        $this->assertEquals($dimension->getUniqueSettings(), null);
        $this->assertEquals($dimension->isVisible(), false);
        $this->assertEquals($dimension->getHierarchies(), 'h1');
        $this->assertEquals($dimension->getHierarchies(), 'h1');
    }