return new BandwidthTransport('username', 'password',
$from, 'account_id', 'application_id', 'priority',
$client ??
new MockHttpClient());
} public function invalidFromProvider(): iterable
{ yield 'no zero at start if phone number' =>
['+0'
];
yield 'phone number too short' =>
['+1'
];
} public static function supportedMessagesProvider(): iterable
{ yield [new SmsMessage('0611223344', 'Hello!'
)];
yield [new SmsMessage('0611223344', 'Hello!', 'from',
new BandwidthOptions(['from' => 'from'
]))];
} /**
* @dataProvider invalidFromProvider
*/
public function testInvalidArgumentExceptionIsThrownIfFromIsInvalid(string
$from) { $transport =
$this->
createTransport(null,
$from);
$this->
expectException(InvalidArgumentException::
class);