mirror of
https://github.com/retailcrm/mailgun-php.git
synced 2024-11-29 16:36:07 +03:00
Move mocks
Created a Mocks directory to seperate mocks from classes. I moved Mailgun\Tests\MailGunTest to Mailgun\Test\Mocks\Mailgun. As it's not a test it's a mock. So shouldn't be suffixed with Test. I mocked Mailgun\Tests\Connection\TestBroker to Mailgun\Tests\Mocks\Connection\TestBroker as it's a mock and should be with other mocks.
This commit is contained in:
parent
08e67d8e9e
commit
3af838f2c8
@ -1,7 +1,7 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
namespace Mailgun\Tests\Connection;
|
namespace Mailgun\Tests\Connection;
|
||||||
|
|
||||||
use Mailgun\Tests\MailgunTest;
|
use Mailgun\Tests\Mock\Mailgun;
|
||||||
|
|
||||||
class ConnectionTest extends \Mailgun\Tests\MailgunTestCase{
|
class ConnectionTest extends \Mailgun\Tests\MailgunTestCase{
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ class ConnectionTest extends \Mailgun\Tests\MailgunTestCase{
|
|||||||
public function setUp(){
|
public function setUp(){
|
||||||
}
|
}
|
||||||
public function testNewClientInstantiation(){
|
public function testNewClientInstantiation(){
|
||||||
$this->client = new MailgunTest("My-Super-Awesome-API-Key", "samples.mailgun.org", false);
|
$this->client = new Mailgun("My-Super-Awesome-API-Key", "samples.mailgun.org", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
namespace Mailgun\Tests\Lists;
|
namespace Mailgun\Tests\Lists;
|
||||||
|
|
||||||
use Mailgun\Tests\MailgunTest;
|
use Mailgun\Tests\Mock\Mailgun;
|
||||||
|
|
||||||
class OptInHandler extends \Mailgun\Tests\MailgunTestCase{
|
class OptInHandler extends \Mailgun\Tests\MailgunTestCase{
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ class OptInHandler extends \Mailgun\Tests\MailgunTestCase{
|
|||||||
private $optInHandler;
|
private $optInHandler;
|
||||||
|
|
||||||
public function setUp(){
|
public function setUp(){
|
||||||
$this->client = new MailgunTest("My-Super-Awesome-API-Key");
|
$this->client = new Mailgun("My-Super-Awesome-API-Key");
|
||||||
$this->optInHandler = $this->client->OptInHandler();
|
$this->optInHandler = $this->client->OptInHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
namespace Mailgun\Tests\Messages;
|
namespace Mailgun\Tests\Messages;
|
||||||
|
|
||||||
use Mailgun\Tests\MailgunTest;
|
use Mailgun\Tests\Mock\Mailgun;
|
||||||
|
|
||||||
class BatchMessageTest extends \Mailgun\Tests\MailgunTestCase{
|
class BatchMessageTest extends \Mailgun\Tests\MailgunTestCase{
|
||||||
|
|
||||||
@ -9,7 +9,7 @@ class BatchMessageTest extends \Mailgun\Tests\MailgunTestCase{
|
|||||||
private $sampleDomain = "samples.mailgun.org";
|
private $sampleDomain = "samples.mailgun.org";
|
||||||
|
|
||||||
public function setUp(){
|
public function setUp(){
|
||||||
$this->client = new MailgunTest("My-Super-Awesome-API-Key");
|
$this->client = new Mailgun("My-Super-Awesome-API-Key");
|
||||||
}
|
}
|
||||||
public function testBlankInstantiation(){
|
public function testBlankInstantiation(){
|
||||||
$message = $this->client->BatchMessage($this->sampleDomain);
|
$message = $this->client->BatchMessage($this->sampleDomain);
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
namespace Mailgun\Tests\Messages;
|
namespace Mailgun\Tests\Messages;
|
||||||
|
|
||||||
use Mailgun\Tests\MailgunTest;
|
use Mailgun\Tests\Mock\Mailgun;
|
||||||
|
|
||||||
class MessageBuilderTest extends \Mailgun\Tests\MailgunTestCase{
|
class MessageBuilderTest extends \Mailgun\Tests\MailgunTestCase{
|
||||||
private $client;
|
private $client;
|
||||||
|
|
||||||
public function setUp(){
|
public function setUp(){
|
||||||
$this->client = new MailgunTest("My-Super-Awesome-API-Key", "samples.mailgun.org", false);
|
$this->client = new Mailgun("My-Super-Awesome-API-Key", "samples.mailgun.org", false);
|
||||||
}
|
}
|
||||||
public function testBlankInstantiation(){
|
public function testBlankInstantiation(){
|
||||||
$message = $this->client->MessageBuilder();
|
$message = $this->client->MessageBuilder();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
namespace Mailgun\Tests\Messages;
|
namespace Mailgun\Tests\Messages;
|
||||||
|
|
||||||
use Mailgun\Tests\MailgunTest;
|
use Mailgun\Tests\Mock\Mailgun;
|
||||||
|
|
||||||
class StandardMessageTest extends \Mailgun\Tests\MailgunTestCase{
|
class StandardMessageTest extends \Mailgun\Tests\MailgunTestCase{
|
||||||
|
|
||||||
@ -9,7 +9,7 @@ class StandardMessageTest extends \Mailgun\Tests\MailgunTestCase{
|
|||||||
private $sampleDomain = "samples.mailgun.org";
|
private $sampleDomain = "samples.mailgun.org";
|
||||||
|
|
||||||
public function setUp(){
|
public function setUp(){
|
||||||
$this->client = new MailgunTest("My-Super-Awesome-API-Key");
|
$this->client = new Mailgun("My-Super-Awesome-API-Key");
|
||||||
}
|
}
|
||||||
public function testSendMIMEMessage(){
|
public function testSendMIMEMessage(){
|
||||||
$customMime = "Received: by luna.mailgun.net with SMTP mgrt 8728174999085; Mon, 10 Jun 2013 09:50:58 +0000
|
$customMime = "Received: by luna.mailgun.net with SMTP mgrt 8728174999085; Mon, 10 Jun 2013 09:50:58 +0000
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Mailgun\Tests\Connection;
|
namespace Mailgun\Tests\Mock\Connection;
|
||||||
|
|
||||||
use Mailgun\Connection\RestClient;
|
use Mailgun\Connection\RestClient;
|
||||||
|
|
||||||
class TestBroker extends RestClient{
|
class TestBroker extends RestClient {
|
||||||
private $apiKey;
|
private $apiKey;
|
||||||
|
|
||||||
protected $apiEndpoint;
|
protected $apiEndpoint;
|
@ -1,11 +1,11 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
|
|
||||||
namespace Mailgun\Tests;
|
namespace Mailgun\Tests\Mock;
|
||||||
|
|
||||||
use Mailgun\Mailgun;
|
use Mailgun\Mailgun as Base;
|
||||||
use Mailgun\Tests\Connection\TestBroker;
|
use Mailgun\Tests\Mock\Connection\TestBroker;
|
||||||
|
|
||||||
class MailgunTest extends Mailgun
|
class Mailgun extends Base
|
||||||
{
|
{
|
||||||
protected $debug;
|
protected $debug;
|
||||||
protected $restClient;
|
protected $restClient;
|
Loading…
Reference in New Issue
Block a user