use generated example phone number

This commit is contained in:
2022-07-15 23:54:52 +02:00
parent 23de1d2f06
commit 4e5147a0ac
4 changed files with 35 additions and 5 deletions

View File

@ -22,6 +22,7 @@ use D3\LinkmobilityClient\Tests\ApiTestCase;
use D3\LinkmobilityClient\ValueObject\Recipient;
use libphonenumber\NumberParseException;
use libphonenumber\PhoneNumber;
use libphonenumber\PhoneNumberFormat;
use libphonenumber\PhoneNumberType;
use libphonenumber\PhoneNumberUtil;
use PHPUnit\Framework\MockObject\MockObject;
@ -35,7 +36,7 @@ class RecipientsListTest extends ApiTestCase
/** @var RecipientsList */
public $recipientsList;
private $phoneNumberFixture = '01527565839';
private $phoneNumberFixture;
private $phoneCountryFixture = 'DE';
/**
@ -51,6 +52,10 @@ class RecipientsListTest extends ApiTestCase
->getMock();
$this->recipientsList = new RecipientsList($clientMock);
$phoneUtil = PhoneNumberUtil::getInstance();
$example = $phoneUtil->getExampleNumberForType($this->phoneCountryFixture, PhoneNumberType::MOBILE);
$this->phoneNumberFixture = $phoneUtil->format($example, PhoneNumberFormat::NATIONAL);
}
/**