Skip to content

Commit

Permalink
Removed Trait and use base class instead
Browse files Browse the repository at this point in the history
  • Loading branch information
byjg committed Apr 17, 2016
1 parent 0ba490b commit b1bb0c2
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ install:
- composer install

script:
- phpunit --bootstrap vendor/autoload.php tests/
- phpunit

28 changes: 28 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->

<!-- see http://www.phpunit.de/wiki/Documentation -->
<phpunit bootstrap="./vendor/autoload.php"
colors="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
stopOnFailure="true">

<filter>
<whitelist>
<directory>./src</directory>
</whitelist>
</filter>

<testsuites>
<testsuite name="Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>

</phpunit>
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

namespace Omnipay\Komerci;

use Omnipay\Common\Message\AbstractRequest;

/**
* Komerci Authorize Request
*/
trait TraitRequest
abstract class BaseRequest extends AbstractRequest
{
protected $endpoint = 'https://ecommerce.userede.com.br/pos_virtual/wskomerci/cap.asmx/';
protected $endpointTest = 'https://ecommerce.userede.com.br/pos_virtual/wskomerci/cap_teste.asmx/';
Expand Down
6 changes: 2 additions & 4 deletions src/Omnipay/Komerci/Message/WSAbstractRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

namespace Omnipay\Komerci\Message;

use Omnipay\Common\Message\AbstractRequest;
use Omnipay\Komerci\BaseRequest;

/**
* Komerci Authorize Request
*/
abstract class WSAbstractRequest extends AbstractRequest
abstract class WSAbstractRequest extends BaseRequest
{
use \Omnipay\Komerci\TraitRequest;

public function getInstallments()
{
return $this->getParameter('installments');
Expand Down
2 changes: 0 additions & 2 deletions src/Omnipay/Komerci/Message/WSVoidRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
*/
class WSVoidRequest extends WSAbstractRequest
{
use \Omnipay\Komerci\TraitRequest;

public function getPreAuth()
{
return $this->getParameter('preauth');
Expand Down

0 comments on commit b1bb0c2

Please sign in to comment.