コード例 #1
0
ファイル: RaceTest.php プロジェクト: civilianemail/dnd
 function testFind()
 {
     //Arrange
     $description = "Average Joe";
     $name = "Human";
     $id = 1;
     $test_race = new Race($description, $name, $id);
     $test_race->save();
     $description2 = "Cool Dude";
     $name2 = "Elf";
     $id2 = 2;
     $test_race2 = new Race($description2, $name2, $id2);
     $test_race2->save();
     //Act
     $result = Race::find($test_race->getId());
     //Assert
     $this->assertEquals($test_race, $result);
 }