function testGetBrandName() { $brand_name = "Air Jordan"; $test_brand = new Brand($brand_name); $result = $test_brand->getBrandName(); $this->assertEquals($brand_name, $result); }
function test_getBrandName() { //Arrange $brand_name = "Nike"; $test_brand = new Brand($brand_name); //Act $result = $test_brand->getBrandName(); //Assert $this->assertEquals("Nike", $result); }
function testSetBrandName() { //Arrange $brand_name = "Feiyue"; $test_brand = new Brand($brand_name); //Act $test_brand->setBrandName($brand_name); $result = $test_brand->getBrandName(); //Assert $this->assertEquals($brand_name, $result); }
function test_setBrandName() { //Arrange $brand_name = "BRAH-DIDAS"; $test_brand = new Brand($brand_name); //Act $test_brand->setBrandName($brand_name); $result = $test_brand->getBrandName(); //Assert $this->assertEquals("BRAH-DIDAS", $result); }
function test_setBrandName() { //Arrange $brand_name = "Converse"; $id = null; $test_brand = new Brand($brand_name, $id); //Act $test_brand->setBrandName("Nike"); $result = $test_brand->getBrandName(); //Assert $this->assertEquals("Nike", $result); }
public function delete($id) { $brand = Brand::getBrandName($id); $rowdelete = Drugcode::deleteBrand($id); //If query succeeds if ($rowdelete > 0) { //$this -> session -> set_userdata('message_counter', '1'); $this->session->set_userdata('msg_error', $brand['Brand'] . ' was deleted !'); } else { //$this -> session -> set_userdata('message_counter', '2'); $this->session->set_userdata('msg_error', 'An error occured while deleting the brand. Try again !'); } redirect("settings_management"); }
function testUpdate() { //Arrange $brand_name = "Sketchers"; $test_brand = new Brand($brand_name); $test_brand->save(); $new_name = "Vans"; //Act $test_brand->update($new_name); //Assert $this->assertEquals($new_name, $test_brand->getBrandName()); }
function testUpdate() { //Arrange $brand_name = "Nike"; $id = 1; $test_brand = new Brand($brand_name, $id); $test_brand->save(); $new_brand_name = "Fila"; //Act $test_brand->update($new_brand_name); //Assert $this->assertEquals('Fila', $test_brand->getBrandName()); }