Ejemplo n.º 1
0
 public function testCreateCategory()
 {
     ItemCategory::Create('Test Category');
     $cat = ItemCategory::FindByName('Test Category');
     $this->assertInstanceOf('ItemCategory', $cat);
     $this->assertTrue($cat->name == 'Test Category');
 }
Ejemplo n.º 2
0
 public function createCategory($name)
 {
     if (ItemCategory::Create($name)) {
         echo 1;
     } else {
         echo 0;
     }
 }