public function testFileEntryAdd()
 {
     $assignEntry = new AssignmentEntry();
     $fileEntry = new FilesEntry();
     $fileEntry->addFile("blah");
     $assignEntry->addFileEntry($fileEntry, "1");
     $entries = $assignEntry->getFileEntries();
     assert(count($entries) == 1);
 }
Example #2
0
 /**
  * This function handles creating a File Entry Object
  *
  * @param $author - author for the commit
  * @param $message - the commit message
  * @param $date - the date for the commit
  * @param $filePaths - the array of file paths
  * @return a File Entry object with all the information passed to it.
  */
 public function createFileEntry($author, $message, $date, $filePaths)
 {
     $entry = new FilesEntry();
     $entry->setAuthor($author);
     $entry->setComment($message);
     $entry->setDate($date);
     $entry->setFilePaths($filePaths);
     $tempFilesArray = $this->parseFileNames($filePaths);
     $entry->setFiles($tempFilesArray);
     return $entry;
 }