예제 #1
0
 public function provider()
 {
     $projectTest = new ProjectTest();
     $web = new Web();
     $web->setWeb('http://www.example.com');
     $web->setProject($projectTest->provider()[0][0]);
     return [[$web]];
 }
예제 #2
0
 public function provider()
 {
     $projectTest = new ProjectTest();
     $contentTypeTest = new ContentTypeTest();
     $logo = new Logo();
     $logo->setContentType($contentTypeTest->provider()[0][0]);
     $logo->setProject($projectTest->provider()[0][0]);
     $logo->setLogo(file_get_contents(__DIR__ . '/../../assets/img/project_logo.jpg'));
     $logo->setHires(file_get_contents(__DIR__ . '/../../assets/img/project_logo.jpg'));
     return [[$logo]];
 }
예제 #3
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]];
 }
예제 #4
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]];
 }
예제 #5
0
 public function testCanFindLatestVersion()
 {
     $projectTest = new ProjectTest();
     /**
      * @var $project Project
      */
     $project = $projectTest->provider()[0][0];
     $project->setProject("This is a testProject . " . Rand::getString(6));
     $project->setNumber(Rand::getInteger(10000, 99999));
     $project = $this->projectService->newEntity($project);
     $this->projectService->getOptions()->setConsiderFppOnlyAsOfficialVersion(false);
     $this->projectService = $this->projectService->setProject($project);
     $latestVersion = $this->projectService->getLatestProjectVersion();
     $this->assertInstanceOf('Project\\Entity\\Version\\Version', $latestVersion);
 }