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