Example #1
0
 public function testAddCategory()
 {
     $p = new ae_PostModel();
     $c1 = new ae_CategoryModel();
     $c1->setId(1);
     $c2 = new ae_CategoryModel();
     $c2->setId(2);
     $p->addCategory($c1);
     $p->addCategory($c2);
     $this->assertEquals($p->getCategories(), array($c1, $c2));
 }