Example #1
0
 public function testReaction()
 {
     $reactionProduct = Type::getByName('Platinum Technite');
     $this->assertTrue($reactionProduct instanceof ReactionProduct);
     //test correct handling of reaction products that can result from alchemy + refining
     $this->assertTrue($reactionProduct->getReactionIDs() == array(17952, 32831));
     //test handling of alchemy reactions with refining + feedback
     $iMod = IndustryModifier::getBySystemIdForPos(30000119);
     $rpd = Type::getByName('Unrefined Platinum Technite Reaction')->react($iMod, 24 * 30, true, true);
     $inTarget = new MaterialMap();
     $inTarget->addMaterial(16640, 72000);
     $inTarget->addMaterial(16644, 7200);
     $this->assertTrue($rpd->getMaterialMap()->getMaterials() == $inTarget->getMaterials());
     $outTarget = new MaterialMap();
     $outTarget->addMaterial(16662, 14400);
     $this->assertTrue($rpd->getOutputMaterialMap()->getMaterials() == $outTarget->getMaterials());
 }