diff --git a/.phpunit.result.cache b/.phpunit.result.cache new file mode 100644 index 0000000..84f87b0 --- /dev/null +++ b/.phpunit.result.cache @@ -0,0 +1 @@ +C:37:"PHPUnit\Runner\DefaultTestResultCache":2963:{a:2:{s:7:"defects";a:3:{s:96:"NotificationChannels\Hubtel\Test\HubtelMessageTest::it_sends_message_given_valid_sms_credentials";i:5;s:106:"NotificationChannels\Hubtel\Test\Feature\HubtelSMSClientTest::it_sends_message_given_valid_sms_credentials";i:4;s:115:"NotificationChannels\Hubtel\Test\Feature\HubtelSMSClientTest::it_does_not_send_message_with_invalid_sms_credentials";i:4;}s:5:"times";a:23:{s:115:"NotificationChannels\Hubtel\Test\HubtelMessageTest::it_can_construct_the_message_with_the_basic_required_parameters";d:0.003;s:95:"NotificationChannels\Hubtel\Test\HubtelMessageTest::it_can_set_the_message_sender_from_a_method";d:0;s:98:"NotificationChannels\Hubtel\Test\HubtelMessageTest::it_can_set_the_message_recipient_from_a_method";d:0;s:96:"NotificationChannels\Hubtel\Test\HubtelMessageTest::it_can_set_the_message_content_from_a_method";d:0;s:88:"NotificationChannels\Hubtel\Test\HubtelMessageTest::it_can_request_for_a_delivery_report";d:0;s:92:"NotificationChannels\Hubtel\Test\HubtelMessageTest::it_can_add_a_client_reference_to_the_sms";d:0;s:81:"NotificationChannels\Hubtel\Test\HubtelMessageTest::it_can_state_the_message_type";d:0;s:98:"NotificationChannels\Hubtel\Test\HubtelMessageTest::it_can_add_user_defined_headers_to_the_message";d:0;s:91:"NotificationChannels\Hubtel\Test\HubtelMessageTest::it_can_set_the_time_to_send_the_message";d:0;s:94:"NotificationChannels\Hubtel\Test\HubtelMessageTest::it_can_send_the_message_as_a_flash_message";d:0;s:96:"NotificationChannels\Hubtel\Test\HubtelMessageTest::it_sends_message_given_valid_sms_credentials";d:0.786;s:106:"NotificationChannels\Hubtel\Test\Feature\HubtelSMSClientTest::it_sends_message_given_valid_sms_credentials";d:0;s:115:"NotificationChannels\Hubtel\Test\Feature\HubtelSMSClientTest::it_does_not_send_message_with_invalid_sms_credentials";d:0.785;s:120:"NotificationChannels\Hubtel\Test\Unit\HubtelMessageTest::it_can_construct_the_message_with_the_basic_required_parameters";d:0.003;s:100:"NotificationChannels\Hubtel\Test\Unit\HubtelMessageTest::it_can_set_the_message_sender_from_a_method";d:0;s:103:"NotificationChannels\Hubtel\Test\Unit\HubtelMessageTest::it_can_set_the_message_recipient_from_a_method";d:0;s:101:"NotificationChannels\Hubtel\Test\Unit\HubtelMessageTest::it_can_set_the_message_content_from_a_method";d:0;s:93:"NotificationChannels\Hubtel\Test\Unit\HubtelMessageTest::it_can_request_for_a_delivery_report";d:0;s:97:"NotificationChannels\Hubtel\Test\Unit\HubtelMessageTest::it_can_add_a_client_reference_to_the_sms";d:0;s:86:"NotificationChannels\Hubtel\Test\Unit\HubtelMessageTest::it_can_state_the_message_type";d:0;s:103:"NotificationChannels\Hubtel\Test\Unit\HubtelMessageTest::it_can_add_user_defined_headers_to_the_message";d:0;s:96:"NotificationChannels\Hubtel\Test\Unit\HubtelMessageTest::it_can_set_the_time_to_send_the_message";d:0;s:99:"NotificationChannels\Hubtel\Test\Unit\HubtelMessageTest::it_can_send_the_message_as_a_flash_message";d:0;}}} \ No newline at end of file diff --git a/src/SMSClients/HubtelSMSClient.php b/src/SMSClients/HubtelSMSClient.php index 277b770..6f0956c 100644 --- a/src/SMSClients/HubtelSMSClient.php +++ b/src/SMSClients/HubtelSMSClient.php @@ -28,7 +28,7 @@ public function send(HubtelMessage $message) public function getApiURL() { - return 'https://api.hubtel.com/v1/messages/send?'; + return 'https://smsc.hubtel.com/v1/messages/send?'; } public function buildMessage(HubtelMessage $message, $apiKey, $apiSecret) diff --git a/tests/Feature/HubtelSMSClientTest.php b/tests/Feature/HubtelSMSClientTest.php new file mode 100644 index 0000000..a007d4a --- /dev/null +++ b/tests/Feature/HubtelSMSClientTest.php @@ -0,0 +1,38 @@ +send($message); + + // $this->assertEquals(201,$response->getStatusCode()); + + $this->assertTrue(true); + } +} \ No newline at end of file diff --git a/tests/HubtelMessageTest.php b/tests/Unit/HubtelMessageTest.php similarity index 98% rename from tests/HubtelMessageTest.php rename to tests/Unit/HubtelMessageTest.php index 25d1ef6..cd563eb 100644 --- a/tests/HubtelMessageTest.php +++ b/tests/Unit/HubtelMessageTest.php @@ -1,6 +1,6 @@