private function resolveStageToProbability()
 {
     if ($this->stage === null) {
         throw new NotSupportedException();
     } else {
         $this->probability = OpportunitiesModule::getProbabilityByStageValue($this->stage->value);
     }
 }
Example #2
0
 /**
  * @depends testGetStageToProbabilityMappingData
  */
 public function testGetProbabilityByStageValue()
 {
     $this->assertEquals(10, OpportunitiesModule::getProbabilityByStageValue('Prospecting'));
     $this->assertEquals(50, OpportunitiesModule::getProbabilityByStageValue('Negotiating'));
     $this->assertEquals(100, OpportunitiesModule::getProbabilityByStageValue('Closed Won'));
 }