Exemplo n.º 1
0
 public function testUpdateCategory()
 {
     $cat = ItemCategory::FindByName('Test Category');
     ItemCategory::Update($cat->id, 'Test Category 2');
     $cat = ItemCategory::FindObject($cat->id);
     $this->assertInstanceOf('ItemCategory', $cat);
     $this->assertTrue($cat->name == 'Test Category 2');
 }
Exemplo n.º 2
0
 public function updateCategory($id, $name)
 {
     if (ItemCategory::Update($id, $name)) {
         echo 1;
     } else {
         echo 0;
     }
 }