Ejemplo n.º 1
0
 public function testGetLeafs()
 {
     $nestedset = new NestedSet_Model();
     $db = Zend_Db::factory('Pdo_Sqlite', array('dbname' => 'tests/test.db'));
     $nestedset->setDb($db);
     $nestedset->setTableName('nested');
     $nestedset->add('foo');
     $nestedset->add('bar', 1);
     $expected_result = array(array('name' => 'bar', 'id' => '2'));
     $this->assertEquals($nestedset->getLeafs(), $expected_result);
 }