Beispiel #1
0
 public function testSites()
 {
     $this->assertNull($this->category->getParent());
     $parent = new Category();
     $this->category->setParent($parent);
     $this->assertEquals($parent, $this->category->getParent());
 }
Beispiel #2
0
 /**
  * Create a new category
  *
  * @param int $i
  * @param Category $parent
  * @return Category
  */
 protected function createCategory($i, Category $parent)
 {
     $cat = new Category();
     $cat->setTranslatableLocale('en');
     $cat->setName('Category ' . $i);
     $cat->setParent($parent);
     $cat->setDescription('test category number ' . $i);
     return $cat;
 }