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()); }
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()); }
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()); }