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