assertInstanceOf(AxeptaConfig::class, $config); } public function test_cannot_instanciate_with_empty_endpoint(): 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 test_cannot_instanciate_with_empty_merchant_id(): 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 test_cannot_instanciate_with_empty_api_key(): 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 test_cannot_instanciate_with_empty_hmac(): 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); } }