예제 #1
0
 function test_getLocation()
 {
     //Arrange
     $name = "The Shoe Store";
     $location = "432 SW Tootsies Ave";
     $phone = "503-555-5555";
     $test_store = new Store($name, $location, $phone);
     //Act
     $result = $test_store->getLocation();
     //Assert
     $this->assertEquals($location, $result);
 }
예제 #2
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);
 }