本文整理汇总了PHP中Brand::setBrandName方法的典型用法代码示例。如果您正苦于以下问题:PHP Brand::setBrandName方法的具体用法?PHP Brand::setBrandName怎么用?PHP Brand::setBrandName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Brand
的用法示例。
在下文中一共展示了Brand::setBrandName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testUpdate
function testUpdate()
{
$brand_name = "dr.martens";
$new_brand = new Brand($brand_name);
$new_brand->save();
$new_brand->setBrandName("doc martens");
$new_brand->update();
$result = Brand::getAll();
$this->assertEquals($new_brand, $result[0]);
}
示例2: 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);
}
示例3: Brand
function test_setBrandName()
{
//Arrange
$brand_name = "Nike";
$test_brand = new Brand($brand_name);
//Act
$test_brand->setBrandName("Nike");
$result = $test_brand->getBrandName();
//Assert
$this->assertEquals("Nike", $result);
}
示例4: executeAddBrand
public function executeAddBrand(sfWebRequest $request)
{
try {
$q = new Brand();
$q->setBrandName($request->getParameter('brand_name'));
$q->save();
$this->res = "Brand Added!";
} catch (Exception $exc) {
$this->res = $exc->getMessage();
}
}
示例5: Brand
function test_brand_set()
{
//Arrange
$brand_name = "Converse";
$id = 1;
$test_brand = new Brand($brand_name, $id);
$new_name = "Nike";
//Act
$test_brand->setBrandName($new_name);
$result = $test_brand->getBrandName();
//Assert
$this->assertEquals($new_name, $result);
}