/** * Test xxxNestedSetPeer::isValid() as false */ public function testPeerIsValidFalse() { $page = new Page(); $this->assertFalse(PagePeer::isValid($page), 'Node left and right values must be invalid'); $this->assertFalse(PagePeer::isValid(null), 'Null must be invalid'); }
/** * Determines if the node has next sibling * * @param PropelPDO $con Connection to use. * @return bool */ public function hasNextSibling(PropelPDO $con = null) { if (!PagePeer::isValid($this)) { return false; } return PageQuery::create()->filterByTreeLeft($this->getRightValue() + 1)->count($con) > 0; }