/** * @test * @group value * @dataProvider toStringProvider * * @param string $definition * @param string $stringRepresentation */ public function to_string_renders_a_correctly_formattted_string_representation($definition, $stringRepresentation) { $countryCode = new CountryCode($definition); $this->assertSame($stringRepresentation, $countryCode->__toString()); }
/** * @param InternationalPhoneNumber $other * @return bool */ public function equals(InternationalPhoneNumber $other) { return $this->countryCode->equals($other->countryCode) && $this->phoneNumber->equals($other->phoneNumber); }