From e74d7ad130e70f43c61a0a4e64971bd16d0a929f Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Sat, 25 Mar 2017 14:02:11 +0100 Subject: [PATCH] Added test for Route::Create (#306) * Added test for Route::Create * cd --- tests/Api/RoutesTest.php | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/tests/Api/RoutesTest.php b/tests/Api/RoutesTest.php index ea0c9f4..2eb8beb 100644 --- a/tests/Api/RoutesTest.php +++ b/tests/Api/RoutesTest.php @@ -9,6 +9,8 @@ namespace Mailgun\Tests\Api; +use GuzzleHttp\Psr7\Response; + /** * @author David Garcia */ @@ -19,6 +21,16 @@ class RoutesTest extends TestCase $this->markTestSkipped('Routes API tests not implemented yet.'); } + public function testCreate() + { + $api = $this->getApiMock(); + $api->expects($this->once()) + ->method('httpPost') + ->willReturn(new Response()); + + $api->create('catch_all()', ['forward("mailbox@myapp.com")'], 'example', 100); + } + /** * {@inheritdoc} */ @@ -26,24 +38,4 @@ class RoutesTest extends TestCase { return 'Mailgun\Api\Routes'; } - - public function testGetRoutesCollection() - { - } - - public function testGetRoutesResource() - { - } - - public function testPostRouteResource() - { - } - - public function testUpdateRouteResource() - { - } - - public function testDeleteRouteResource() - { - } }