Beispiel #1
0
 function testUpdate()
 {
     $name = "Randy Mclure";
     $test_patron = new Patron($name);
     $test_patron->save();
     $new_name = "Neal Stephenson";
     $test_patron->update($new_name);
     $this->assertEquals($new_name, $test_patron->getName());
 }
Beispiel #2
0
 function testUpdate()
 {
     $patron_name = "Jasmine";
     $new_patron = new Patron($patron_name);
     $new_patron->save();
     $new_patron->setPatronName("Jafar");
     $new_patron->update();
     $result = Patron::getAll();
     $this->assertEquals($new_patron, $result[0]);
 }
Beispiel #3
0
 function testUpdate()
 {
     //Arrange
     $name = "Jim Bob";
     $id = 1;
     $test_patron = new Patron($name, $id);
     $test_patron->save();
     $new_name = "Sally Sue";
     //Act
     $test_patron->update($new_name);
     //Assert
     $this->assertEquals("Sally Sue", $test_patron->getName());
 }
Beispiel #4
0
 function test_Update()
 {
     //Arrange
     $patron_name = "Paco";
     $id = null;
     $test_patron = new Patron($patron_name, $id);
     $test_patron->save();
     $new_patron_name = "BurritoJr";
     //Act
     $test_patron->update($new_patron_name);
     $result = $test_patron->getPatronName();
     //Assert
     $this->assertEquals($new_patron_name, $result);
 }
 function testUpdate()
 {
     //Arrange
     $patron_name = "Sally";
     $phone_number = "1234567890";
     $test_patron = new Patron($patron_name, $phone_number);
     $test_patron->save();
     $column_to_update = "patron_name";
     $new_patron_information = "Harry Potter";
     //Act
     $test_patron->update($column_to_update, $new_patron_information);
     $result = Patron::getAll();
     //Assert
     $this->assertEquals("Harry Potter", $result[0]->getPatronName());
 }
 function testUpdate()
 {
     //Arrange
     $id = null;
     $name = "Allen";
     $phone = "4444";
     $test_patron = new Patron($id, $name, $phone);
     $new_phone = "6666666";
     //Act
     $test_patron->update($new_phone);
     //Assert
     $result = $test_patron->getPhone();
     $this->assertEquals($new_phone, $result);
 }
Beispiel #7
0
 function test_updatePhone()
 {
     //Arrange
     $name = "Suzie Palloozi";
     $phone = "1-800-439-0398";
     $test_patron = new Patron($name, $phone);
     $test_patron->save();
     $column_to_update = "phone";
     $new_info = "570-943-0483";
     //Act
     $test_patron->update($column_to_update, $new_info);
     //Assert
     $result = Patron::getAll();
     $this->assertEquals("570-943-0483", $result[0]->getPhone());
 }
Beispiel #8
0
 function testUpdate()
 {
     //Arrange
     $name = "Name";
     $test_patron = new Patron($name);
     $test_patron->save();
     $new_name = "New Name";
     //Act
     $test_patron->update($new_name);
     //Assert
     $this->assertEquals($test_patron->getName(), $new_name);
 }