/** * Test the getLatestEvent() function */ public function testGetLatestEvent() { $jobApplication = JobApplication::GetJobApplication(1); $event = $jobApplication->getLatestEvent(); $this->assertNotNull($event); $this->assertEquals(2, $event->getId()); $this->assertEquals("2nd Interview notes, here", $event->getNotes()); $jobApplication = JobApplication::GetJobApplication(2); $event = $jobApplication->getLatestEvent(); $this->assertNotNull($event); $this->assertEquals(3, $event->getId()); $this->assertEquals("3rd Interview notes, here", $event->getNotes()); $jobApplication = JobApplication::GetJobApplication(3); $event = $jobApplication->getLatestEvent(); $this->assertNull($event); }