Пример #1
0
 public function testGetValues()
 {
     $date = new \DateTimeImmutable();
     $hash = 'foobar';
     $claims = $this->getMock('asylgrp\\workbench\\Domain\\ClaimArray');
     $fundsPre = new SEK('1');
     $fundsPost = new SEK('2');
     $ratio = new SEK('3');
     $guarantee = new SEK('4');
     $decision = new Decision($date, $hash, $claims, $fundsPre, $fundsPost, $ratio, $guarantee);
     $this->assertSame($date, $decision->getDate());
     $this->assertSame($hash, $decision->getHash());
     $this->assertSame($claims, $decision->getClaims());
     $this->assertSame($fundsPre, $decision->getFundsPre());
     $this->assertSame($fundsPost, $decision->getFundsPost());
     $this->assertSame($ratio, $decision->getRatio());
     $this->assertSame($guarantee, $decision->getGuarantee());
 }
Пример #2
0
 /**
  * Render report
  *
  * @param  Decision $decision
  * @return string
  */
 public function render(Decision $decision)
 {
     return $this->getTemplateEngine()->render($this->template, ['groups' => $this->grouper->group($decision->getClaims()), 'decision' => $decision, 'format' => function (SEK $money) {
         return $money->getString(0) . ' kr';
     }]);
 }