コード例 #1
0
ファイル: PatronTest.php プロジェクト: r-hills/library-1
 function test_updateName()
 {
     //Arrange
     $name = "Suzie Palloozi";
     $phone = "1-800-439-0398";
     $test_patron = new Patron($name, $phone);
     $test_patron->save();
     // $column_to_update = "name";
     $new_name = "Suzie Q";
     //Act
     $test_patron->updateName($new_name);
     //Assert
     $result = Patron::getAll();
     $this->assertEquals("Suzie Q", $result[0]->getName());
 }
コード例 #2
0
ファイル: PatronTest.php プロジェクト: r-hills/Library
 function test_updateName()
 {
     //Arrange
     $name = "Dan Brown";
     $phone = "3";
     $email = "*****@*****.**";
     $test_patron = new Patron($name, $phone, $email);
     $test_patron->save();
     //Act
     $new_name = "Billy Worthington";
     $test_patron->updateName($new_name);
     //Assert
     $result = Patron::getAll();
     $this->assertEquals($new_name, $result[0]->getName());
 }