basicValidEmail example


        unset($this->response, $this->httpClient, $this->transport);
    }

    public function testToString()
    {
        $this->assertSame('infobip+api://99999.api.infobip.com', (string) $this->transport);
    }

    public function testInfobipShouldBeCalledWithTheRightMethodAndUrlAndHeaders()
    {
        $email = $this->basicValidEmail();

        $this->transport->send($email);

        $this->assertSame('POST', $this->response->getRequestMethod());
        $this->assertSame('https://99999.api.infobip.com/email/3/send', $this->response->getRequestUrl());
        $options = $this->response->getRequestOptions();
        $this->arrayHasKey('headers');
        $this->assertCount(4, $options['headers']);
        $this->assertStringMatchesFormat('Content-Type: multipart/form-data; boundary=%s', $options['headers'][0]);
        $this->assertSame('Authorization: App k3y', $options['headers'][1]);
        $this->assertSame('Accept: application/json', $options['headers'][2]);
        
Home | Imprint | This part of the site doesn't use cookies.