public function testRetrieveRoot() { $this->assertTrue(method_exists('Table10Peer', 'retrieveRoot'), 'nested_set adds a retrieveRoot() method'); Table10Peer::doDeleteAll(); $t1 = new Table10(); $t1->setLeftValue(1); $t1->setRightValue(2); $t1->setScopeValue(2); $t1->save(); $this->assertNull(Table10Peer::retrieveRoot(1), 'retrieveRoot() returns null as long as no root node is defined in the required scope'); $t2 = new Table10(); $t2->setLeftValue(1); $t2->setRightValue(2); $t2->setScopeValue(1); $t2->save(); $this->assertEquals(Table10Peer::retrieveRoot(1), $t2, 'retrieveRoot() retrieves the root node in the required scope'); }