Example #1
0
 public function testCreateAndRetrieve()
 {
     $root = Category::getRootNode();
     $list = ProductList::getNewInstance($root);
     $list->save();
     $list2 = ProductList::getNewInstance($root);
     $list2->save();
     $lists = ProductList::getCategoryLists($root);
     $this->assertSame($lists->get(0), $list);
     $this->assertSame($lists->get(1), $list2);
     $this->assertEqual($list->position->get(), 0);
     $this->assertEqual($list2->position->get(), 1);
 }