本文整理汇总了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);
}