本文整理匯總了PHP中Store::setAddress方法的典型用法代碼示例。如果您正苦於以下問題:PHP Store::setAddress方法的具體用法?PHP Store::setAddress怎麽用?PHP Store::setAddress使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Store
的用法示例。
在下文中一共展示了Store::setAddress方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Store
function test_setAddress()
{
//Arrange
$retailer = "Nordstrom";
$address = "1234 SW Main Street";
$phone = "123-456-7890";
$test_store = new Store($retailer, $address, $phone);
$new_address = "4321 NE Elm Street";
//Act
$test_store->setAddress($new_address);
$result = $test_store->getAddress();
//Assert
$this->assertEquals($new_address, $result);
}
示例2: testSetAddress
function testSetAddress()
{
//Arrange
$store_name = "Chill N Fill";
$id = 1;
$category = "bar";
$region = "North Portland";
$address = "5215 N Lombard Portland, OR 97203";
$test_store = new Store($store_name, $category, $region, $address, $id);
//Act
$test_store->setAddress("5553 N Lombard Portland, OR 97203");
$result = $test_store->getAddress();
//Assert
$this->assertEquals("5553 N Lombard Portland, OR 97203", $result);
}