public function testShiftLevel() { $this->initTreeWithScope(); Table10Peer::shiftLevel($delta = 1, $first = 7, $last = 12, $scope = 1); Table10Peer::clearInstancePool(); $expected = array('t1' => array(1, 14, 0), 't2' => array(2, 3, 1), 't3' => array(4, 13, 1), 't4' => array(5, 6, 2), 't5' => array(7, 12, 3), 't6' => array(8, 9, 4), 't7' => array(10, 11, 4)); $this->assertEquals($this->dumpTreeWithScope(1), $expected, 'shiftLevel can shift level whith a scope'); $expected = array('t8' => array(1, 6, 0), 't9' => array(2, 3, 1), 't10' => array(4, 5, 1)); $this->assertEquals($this->dumpTreeWithScope(2), $expected, 'shiftLevel does not shift anything out of the scope'); }