コード例 #1
0
ファイル: StoreTest.php プロジェクト: r-hills/Shoes
 function test_updatePhone()
 {
     //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_phone = "(888) 123-4567";
     $test_store->updatePhone($new_phone);
     //Assert
     $this->assertEquals($new_phone, $test_store->getPhone());
 }
コード例 #2
0
ファイル: StoreTest.php プロジェクト: ashlinaronin/shoes
 function test_updatePhone()
 {
     //Arrange
     $name = "Burchs";
     $location = "Oakway Center";
     $phone = "5415131122";
     $test_store = new Store($name, $location, $phone);
     $test_store->save();
     //Act
     $new_phone = "5037898756";
     $test_store->updatePhone($new_phone);
     //Assert
     $result = Store::getAll();
     $this->assertEquals($new_phone, $result[0]->getPhone());
 }