本文整理汇总了PHP中Store::getAddress方法的典型用法代码示例。如果您正苦于以下问题:PHP Store::getAddress方法的具体用法?PHP Store::getAddress怎么用?PHP Store::getAddress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Store
的用法示例。
在下文中一共展示了Store::getAddress方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Store
function test_updateAddress()
{
//Arrange
$name = "House of Shoes and Waffles";
$address = "123 Street";
$phone = "4-44";
$test_store = new Store($name, $address, $phone);
$test_store->save();
// Act
$new_address = "456 Main Street";
$test_store->updateAddress($new_address);
//Assert
$this->assertEquals($new_address, $test_store->getAddress());
}
示例2: Store
function test_update()
{
//Arrange
$retailer = "Nordstrom";
$address = "1234 SW Main Street";
$phone = "123-456-7890";
$id = null;
$test_store = new Store($retailer, $address, $phone, $id);
$test_store->save();
$new_retailer = "Macys";
$new_address = "400 SW 6th Avenue";
$new_phone = "888-888-8888";
//Act
$test_store->update($new_retailer, $new_address, $new_phone);
//Assert
$this->assertEquals($new_retailer, $test_store->getRetailer());
$this->assertEquals($new_address, $test_store->getAddress());
$this->assertEquals($new_phone, $test_store->getPhone());
}
示例3: testUpdate
function testUpdate()
{
//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);
$test_store->save();
$new_store_name = "Fill N Chill";
$new_category = "bottleshop";
$new_region = "SW Portland";
$new_address = "5215 N Chautauqua Blvd Portland, OR 97203";
//Act
$test_store->update($new_store_name, $new_category, $new_region, $new_address);
//Assert
$this->assertEquals("Fill N Chill", $test_store->getStoreName());
$this->assertEquals("bottleshop", $test_store->getCategory());
$this->assertEquals("SW Portland", $test_store->getRegion());
$this->assertEquals("5215 N Chautauqua Blvd Portland, OR 97203", $test_store->getAddress());
}