コード例 #1
0
ファイル: AmountPence.php プロジェクト: assertis/util-lib
 /**
  * @param AmountPence $amount
  * @return bool
  */
 public function equals(AmountPence $amount) : bool
 {
     return $this->getValue() === $amount->getValue();
 }
コード例 #2
0
ファイル: AmountPenceTest.php プロジェクト: assertis/util-lib
 /**
  * @dataProvider provideFromHumanReadableString
  * @param string $string
  * @param int $pence
  */
 public function testFromHumanReadableString(string $string, int $pence)
 {
     self::assertSame($pence, AmountPence::fromHumanReadableString($string)->getValue());
 }