Exemplo n.º 1
0
 function testUpdateLocation()
 {
     //Arrange
     $name = "shoe store";
     $location = "1234 nw 1st street";
     $id = 4;
     $test_store = new Store($name, $location, $id);
     $test_store->save();
     $new_location = "5555 sw 3rd street";
     //Act
     $test_store->updateLocation($new_location);
     $result = $test_store->getLocation();
     //Assert
     $this->assertEquals($new_location, $result);
 }
Exemplo n.º 2
0
 function test_updateLocation()
 {
     //Arrange
     $name = "Burchs";
     $location = "Oakway Center";
     $phone = "5415131122";
     $test_store = new Store($name, $location, $phone);
     $test_store->save();
     //Act
     $new_location = "Downtown";
     $test_store->updateLocation($new_location);
     //Assert
     $result = Store::getAll();
     $this->assertEquals($new_location, $result[0]->getLocation());
 }