Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Recca Tsai committed Feb 28, 2017
1 parent 48c5345 commit b25b6ac
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion tests/Action/Api/CancelTransactionActionTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace PayumTW\Esunbank\Tests\Api;
namespace PayumTW\Esunbank\Tests\Action\Api;

use Mockery as m;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Action/Api/CreateTransactionActionTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace PayumTW\Esunbank\Tests\Api;
namespace PayumTW\Esunbank\Tests\Action\Api;

use Mockery as m;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Action/Api/GetTransactionDataActionTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace PayumTW\Esunbank\Tests\Api;
namespace PayumTW\Esunbank\Tests\Action\Api;

use Mockery as m;
use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Action/Api/RefundTransactionActionTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace PayumTW\Esunbank\Tests\Api;
namespace PayumTW\Esunbank\Tests\Action\Api;

use Mockery as m;
use PHPUnit\Framework\TestCase;
Expand Down
5 changes: 3 additions & 2 deletions tests/Action/CancelActionTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php

namespace PayumTW\Esunbank\Tests;
namespace PayumTW\Esunbank\Tests\Action;

use Mockery as m;
use Payum\Core\Request\Cancel;
use PHPUnit\Framework\TestCase;
use Payum\Core\Bridge\Spl\ArrayObject;
use PayumTW\Esunbank\Action\CancelAction;

class CancelActionTest extends TestCase
Expand All @@ -17,7 +18,7 @@ protected function tearDown()
public function testExecute()
{
$action = new CancelAction();
$request = m::mock(new Cancel([]));
$request = new Cancel(new ArrayObject([]));

$action->setGateway(
$gateway = m::mock('Payum\Core\GatewayInterface')
Expand Down
9 changes: 5 additions & 4 deletions tests/Action/CaptureActionTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php

namespace PayumTW\Esunbank\Tests;
namespace PayumTW\Esunbank\Tests\Action;

use Mockery as m;
use Payum\Core\Request\Capture;
use PHPUnit\Framework\TestCase;
use Payum\Core\Bridge\Spl\ArrayObject;
use Payum\Core\Request\GetHttpRequest;
use PayumTW\Esunbank\Action\CaptureAction;

Expand All @@ -18,7 +19,7 @@ protected function tearDown()
public function testExecute()
{
$action = new CaptureAction();
$request = m::mock(new Capture([]));
$request = m::mock(new Capture(new ArrayObject([])));
$action->setGateway(
$gateway = m::mock('Payum\Core\GatewayInterface')
);
Expand All @@ -39,7 +40,7 @@ public function testExecute()
public function testCaptured()
{
$action = new CaptureAction();
$request = m::mock(new Capture([]));
$request = new Capture(new ArrayObject([]));

$action->setGateway(
$gateway = m::mock('Payum\Core\GatewayInterface')
Expand Down Expand Up @@ -71,7 +72,7 @@ public function testCaptured()
public function testCaptureFail()
{
$action = new CaptureAction();
$request = m::mock(new Capture([]));
$request = new Capture(new ArrayObject([]));

$action->setGateway(
$gateway = m::mock('Payum\Core\GatewayInterface')
Expand Down
5 changes: 3 additions & 2 deletions tests/Action/RefundActionTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php

namespace PayumTW\Esunbank\Tests;
namespace PayumTW\Esunbank\Tests\Action;

use Mockery as m;
use Payum\Core\Request\Refund;
use PHPUnit\Framework\TestCase;
use Payum\Core\Bridge\Spl\ArrayObject;
use PayumTW\Esunbank\Action\RefundAction;

class RefundActionTest extends TestCase
Expand All @@ -17,7 +18,7 @@ protected function tearDown()
public function testExecute()
{
$action = new RefundAction();
$request = m::mock(new Refund([]));
$request = new Refund(new ArrayObject([]));

$action->setGateway(
$gateway = m::mock('Payum\Core\GatewayInterface')
Expand Down
5 changes: 3 additions & 2 deletions tests/Action/SyncActionTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php

namespace PayumTW\Esunbank\Tests;
namespace PayumTW\Esunbank\Tests\Action;

use Mockery as m;
use Payum\Core\Request\Sync;
use PHPUnit\Framework\TestCase;
use Payum\Core\Bridge\Spl\ArrayObject;
use PayumTW\Esunbank\Action\SyncAction;

class SyncActionTest extends TestCase
Expand All @@ -17,7 +18,7 @@ protected function tearDown()
public function testExecute()
{
$action = new SyncAction();
$request = m::mock(new Sync([]));
$request = new Sync(new ArrayObject([]));

$action->setGateway(
$gateway = m::mock('Payum\Core\GatewayInterface')
Expand Down

0 comments on commit b25b6ac

Please sign in to comment.