コード例 #1
0
ファイル: PatronTest.php プロジェクト: jschold/Library
 function testGetPatronName()
 {
     $patron_name = "Jasmine";
     $new_patron = new Patron($patron_name);
     $result = $new_patron->getPatronName();
     $this->assertEquals("Jasmine", $result);
 }
コード例 #2
0
ファイル: PatronTest.php プロジェクト: umamiMike/library-1
 function testUpdate()
 {
     $patron_name = "Randy Mclure";
     $test_patron = new Patron($patron_name);
     $test_patron->save();
     $new_name = "Neal Stephenson";
     $test_patron->update($new_name);
     $this->assertEquals($new_name, $test_patron->getPatronName());
 }
コード例 #3
0
ファイル: PatronTest.php プロジェクト: kylepratuch/library-1
 function testGetPatronName()
 {
     //Arrange
     $patron_name = "Eduardo";
     $test_patron = new Patron($patron_name);
     //Act
     $result = $test_patron->getPatronName();
     //Assert
     $this->assertEquals($patron_name, $result);
 }
コード例 #4
0
 function testSetPatronName()
 {
     //Arrange
     $patron_name = "Sally";
     $phone_number = "1234567890";
     $test_patron = new Patron($patron_name, $phone_number);
     //Act
     $test_patron->setPatronName("Joe");
     $result = $test_patron->getPatronName();
     //Assert
     $this->assertEquals("Joe", $result);
 }
コード例 #5
0
ファイル: PatronTest.php プロジェクト: kennygrage/epicLibrary
 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);
 }
コード例 #6
0
ファイル: PatronTest.php プロジェクト: jlbethel/library-1
 function testUpdatePatronName()
 {
     //Arrange
     $patron_name = "Joe Patron";
     $id = 1;
     $test_patron = new Patron($patron_name, $id);
     $test_patron->save();
     $new_name = "James Patron";
     //Act
     $test_patron->updatePatronName($new_name);
     //Assert
     $this->assertEquals("James Patron", $test_patron->getPatronName());
 }
コード例 #7
0
 function testUpdatePatronName()
 {
     $name = "Satan";
     $id = 1;
     $test_patron = new Patron($name, $id);
     $test_patron->save();
     $new_name = "Jesus";
     $test_patron->updatePatronName($new_name);
     $this->assertEquals("Jesus", $test_patron->getPatronName());
 }