예제 #1
0
 /**
  * @return array
  */
 public function provider()
 {
     $dateTime = new \DateTime();
     $dateStart = $dateTime->sub(new \DateInterval('P1Y'));
     $dateEnd = $dateTime->add(new \DateInterval('P4Y'));
     $dateTime = new \DateTime();
     $dateStartActual = $dateTime->sub(new \DateInterval('P6M'));
     $dateEndActual = $dateTime->add(new \DateInterval('P3Y'));
     $contactTest = new ContactTest();
     $callTest = new CallTest();
     $project = new Project();
     $project->setCall($callTest->provider()[0][0]);
     $project->setDateStart($dateStart);
     $project->setDateEnd($dateEnd);
     $project->setDateStartActual($dateStartActual);
     $project->setDateEndActual($dateEndActual);
     $project->setNumber(Rand::getString(4));
     $project->setContact($contactTest->provider()[0][0]);
     $project->setSummary('This is the summary');
     $project->setDescription('This is the description');
     $versionType = new Type();
     $versionType->setType('Type');
     $versionType->setId(1);
     return [[$project, $versionType]];
 }
예제 #2
0
 public function provider()
 {
     $projectTest = new ProjectTest();
     $contactTest = new ContactTest();
     $documentTypeTest = new TypeTest();
     $contentTypeTest = new ContentTypeTest();
     $document = new Document();
     $document->setDocument('This is a test-document');
     $document->setType(10000);
     $document->setContentType($contentTypeTest->provider()[0][0]);
     $document->setContact($contactTest->provider()[0][0]);
     $document->setProject($projectTest->provider()[0][0]);
     $document->setType($documentTypeTest->provider()[0][0]);
     return [[$document]];
 }
예제 #3
0
 /**
  * @return Version
  */
 public function provider()
 {
     $dateTime = new \DateTime();
     $dateStart = $dateTime->sub(new \DateInterval('P1Y'));
     $dateEnd = $dateTime->add(new \DateInterval('P4Y'));
     $dateTime = new \DateTime();
     $dateSubmitted = $dateTime->add(new \DateInterval('P3Y'));
     $dateReviewed = $dateTime->add(new \DateInterval('P3Y'));
     $projectTest = new ProjectTest();
     $contactTest = new ContactTest();
     $versionTypeTest = new TypeTest();
     $version = new Version();
     $version->setDateSubmitted($dateSubmitted);
     $version->setDateReviewed($dateReviewed);
     $version->setApproved(Version::STATUS_APPROVED);
     $version->setDateStart($dateStart);
     $version->setDateEnd($dateEnd);
     $version->setProject($projectTest->provider()[0][0]);
     $version->setContact($contactTest->provider()[0][0]);
     $version->setVersionType($versionTypeTest->provider()[0][0]);
     return [[$version]];
 }