/** * @param AmountPence $amount * @return bool */ public function equals(AmountPence $amount) : bool { return $this->getValue() === $amount->getValue(); }
/** * @dataProvider provideFromHumanReadableString * @param string $string * @param int $pence */ public function testFromHumanReadableString(string $string, int $pence) { self::assertSame($pence, AmountPence::fromHumanReadableString($string)->getValue()); }