educationNotationUtils = new EducationNotationUtils(); $criteriaNotation = new CriteriaNotation(); $criteriaNotation->setType(TypeCriteriaEnum::WITH_NOTATION()->getValue()); $criteriaNotation->setNoteMax(50); $this->educationNotation = new EducationNotation(); $this->educationNotation->setCriteriaNotation($criteriaNotation); } /** * @see EducationNotationUtils::getNotationTransformed() */ public function testGetNotationTransformed() { $parameters = new Parameters(); $parameters->setAverage(80); $organization = new Organization(); $organization->setParameters($parameters); $access = new Access(); $access->setOrganization($organization); $educationStudent = new EducationStudent(); $educationStudent->setAccess($access); $this->educationNotation->setEducationStudent($educationStudent); $this->educationNotation->setNote(100); $this->assertEquals(80, $this->educationNotationUtils->getNotationTransformed($this->educationNotation)); $this->educationNotation->setNote(50); $this->assertEquals(40, $this->educationNotationUtils->getNotationTransformed($this->educationNotation)); } /** * @see EducationNotationUtils::getNotationOriginal() */ public function testGetNotationOriginal() { $this->educationNotation->setNote(100); $this->assertEquals(50, $this->educationNotationUtils->getNotationOriginal($this->educationNotation)); $this->educationNotation->setNote(50); $this->assertEquals(25, $this->educationNotationUtils->getNotationOriginal($this->educationNotation)); } }