Exemplo n.º 1
0
 public function testGetSubcategories()
 {
     $c = new \XLite\Model\Category();
     $c->map($this->categoryData);
     $this->assertEquals(0, count($c->getSubcategories()), 'check empty childs');
     $child = new \XLite\Model\Category();
     $c->addChildren($child);
     $child->setParent($c);
     $this->assertEquals(1, count($c->getSubcategories()), 'check childs length');
 }