Beispiel #1
0
 function test_find()
 {
     //Arrange
     $description = "Granite";
     $description2 = "Crystal";
     $test_Rock = new Rock($description);
     $test_Rock->save();
     $test_Rock2 = new Rock($description2);
     $test_Rock2->save();
     //Act
     $id = $test_Rock->getId();
     $result = Rock::find($id);
     //Assert
     $this->assertEquals($test_Rock, $result);
 }