PHP Trait Laracasts\Behat\Context\Services\MailTrap

Mostrar archivo Open project: laracasts/behat-laravel-extension

Protected Properties

Property Type Description
$client GuzzleHttp\Client The Guzzle client.
$mailTrapApiKey string The MailTrap API Key.
$mailTrapInboxId integer The MailTrap configuration.

Public Methods

Method Description
emptyInbox ( ) Empty the MailTrap inbox.

Protected Methods

Method Description
alreadyConfigured ( ) : boolean Determine if MailTrap config has been retrieved yet.
applyMailTrapConfiguration ( integer | null $inboxId = null ) Get the configuration for MailTrap.
fetchInbox ( integer | null $inboxId = null ) : mixed Fetch a MailTrap inbox.
getMailTrapCleanUrl ( ) : string Get the MailTrap "empty inbox" endpoint.
getMailTrapMessagesUrl ( ) : string Get the MailTrap messages endpoint.
parseJson ( $body ) : array | mixed
requestClient ( ) : Client Request a new Guzzle client.

Method Details

alreadyConfigured() protected method

Determine if MailTrap config has been retrieved yet.
protected alreadyConfigured ( ) : boolean
return boolean

applyMailTrapConfiguration() protected method

Get the configuration for MailTrap.
protected applyMailTrapConfiguration ( integer | null $inboxId = null )
$inboxId integer | null

emptyInbox() public method

Empty the MailTrap inbox.
public emptyInbox ( )

fetchInbox() protected method

Fetch a MailTrap inbox.
protected fetchInbox ( integer | null $inboxId = null ) : mixed
$inboxId integer | null
return mixed

getMailTrapCleanUrl() protected method

Get the MailTrap "empty inbox" endpoint.
protected getMailTrapCleanUrl ( ) : string
return string

getMailTrapMessagesUrl() protected method

Get the MailTrap messages endpoint.
protected getMailTrapMessagesUrl ( ) : string
return string

parseJson() protected method

protected parseJson ( $body ) : array | mixed
$body
return array | mixed

requestClient() protected method

Request a new Guzzle client.
protected requestClient ( ) : Client
return GuzzleHttp\Client

Property Details

$client protected_oe property

The Guzzle client.
protected Client,GuzzleHttp $client
return GuzzleHttp\Client

$mailTrapApiKey protected_oe property

The MailTrap API Key.
protected string $mailTrapApiKey
return string

$mailTrapInboxId protected_oe property

The MailTrap configuration.
protected int $mailTrapInboxId
return integer