本文整理汇总了PHP中Brand::getBrandName方法的典型用法代码示例。如果您正苦于以下问题:PHP Brand::getBrandName方法的具体用法?PHP Brand::getBrandName怎么用?PHP Brand::getBrandName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Brand
的用法示例。
在下文中一共展示了Brand::getBrandName方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetBrandName
function testGetBrandName()
{
$brand_name = "Air Jordan";
$test_brand = new Brand($brand_name);
$result = $test_brand->getBrandName();
$this->assertEquals($brand_name, $result);
}
示例2: Brand
function test_getBrandName()
{
//Arrange
$brand_name = "Nike";
$test_brand = new Brand($brand_name);
//Act
$result = $test_brand->getBrandName();
//Assert
$this->assertEquals("Nike", $result);
}
示例3: testSetBrandName
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);
}
示例4: Brand
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);
}
示例5: Brand
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);
}
示例6: delete
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");
}
示例7: testUpdate
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());
}
示例8: testUpdate
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());
}