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');
 }
Exemple #2
0
 public function updateCategory($id, $name)
 {
     if (ItemCategory::Update($id, $name)) {
         echo 1;
     } else {
         echo 0;
     }
 }