Example #1
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;
 }
Example #2
0
 public function testSetTranslatableLocale()
 {
     $this->category->setTranslatableLocale('de');
     $this->assertAttributeEquals('de', 'locale', $this->category);
 }