assertInstanceOf(AxeptaConfig::class, $config); } public function testCannotInstanciateWithEmptyEndpoint(): void { $this->assertThrows(function () { // GIVEN $endpoint = ''; $merchantId = 'M_123'; $apiKey = 'key'; $hmac = 'hmac'; // WHEN new AxeptaConfig( $endpoint, $merchantId, $apiKey, $hmac ); // THEN }, DomainException::class); } public function testCannotInstanciateWithEmptyMerchantId(): void { $this->assertThrows(function () { // GIVEN $endpoint = 'https://api.axepta.com'; $merchantId = ''; $apiKey = 'key'; $hmac = 'hmac'; // WHEN new AxeptaConfig( $endpoint, $merchantId, $apiKey, $hmac ); // THEN }, DomainException::class); } public function testCannotInstanciateWithEmptyApiKey(): void { $this->assertThrows(function () { // GIVEN $endpoint = 'https://api.axepta.com'; $merchantId = 'M_123'; $apiKey = ''; $hmac = 'hmac'; // WHEN new AxeptaConfig( $endpoint, $merchantId, $apiKey, $hmac ); // THEN }, DomainException::class); } public function testCannotInstanciateWithEmptyHmac(): void { $this->assertThrows(function () { // GIVEN $endpoint = 'https://api.axepta.com'; $merchantId = 'M_123'; $apiKey = 'key'; $hmac = ''; // WHEN new AxeptaConfig( $endpoint, $merchantId, $apiKey, $hmac ); // THEN }, DomainException::class); } }