本文整理匯總了PHP中Store::setName方法的典型用法代碼示例。如果您正苦於以下問題:PHP Store::setName方法的具體用法?PHP Store::setName怎麽用?PHP Store::setName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Store
的用法示例。
在下文中一共展示了Store::setName方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Store
function test_setName()
{
$name = "Foot Locker";
$test_store = new Store($name, $id);
$test_store->setName("Foot Action");
$result = $test_store->getName();
$this->assertEquals("Foot Action", $result);
}
示例2: testSetName
function testSetName()
{
//Arrange
$store_name = "nike store";
$test_store = new Store($store_name);
//Act
$test_store->setName("puma store ");
$result = $test_store->getName();
//Assert
$this->assertEquals("puma store ", $result);
}
示例3: Store
function test_setName()
{
//Arrange
$name = "Shoe One";
$id = 1;
$test_store = new Store($name, $id);
//Act
$test_store->setName("Source Shoe");
$result = $test_store->getName();
//Assert
$this->assertEquals($result, "Source Shoe");
}
示例4: testSetName
function testSetName()
{
//Arrange
$name = "Shoe Depot";
$id = 1;
$test_store = new Store($name, $id);
//Act
$test_store->setName("Clogs-N-More");
$result = $test_store->getName();
//Assert
$this->assertEquals("Clogs-N-More", $result);
}
示例5: testSetName
function testSetName()
{
//Arrange
$name = "shoe store";
$location = "123 n fake st";
$test_store = new Store($name, $location);
$new_name = "new store";
//Act
$test_store->setName($new_name);
$result = $test_store->getName();
//Assert
$this->assertEquals($new_name, $result);
}