Skip to content

Commit

Permalink
Fixed UnitTests
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian de Laender committed Sep 8, 2016
1 parent 0212074 commit bedcbff
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
],
"license": "BSD-2-Clause",
"require-dev": {
"phpunit/phpunit": "3.7.*"
"phpunit/phpunit": "4.8.*"
}
}
6 changes: 3 additions & 3 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
$project_dir = dirname(dirname(__FILE__));

$map = array(
"MollieHelper" => "$project_dir/catalog/controller/payment/mollie/helper.php",
"ControllerPaymentMollieBase" => "$project_dir/catalog/controller/payment/mollie/base.php",
"ModelPaymentMollieBase" => "$project_dir/catalog/model/payment/mollie/base.php",
"MollieHelper" => "$project_dir/catalog/controller/extension/payment/mollie/helper.php",
"ControllerExtensionPaymentMollieBase" => "$project_dir/catalog/controller/extension/payment/mollie/base.php",
"ModelExtensionPaymentMollieBase" => "$project_dir/catalog/model/extension/payment/mollie/base.php",
);

if (isset($map[$className]))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

class ModelPaymentMollieIdealTest extends Mollie_OpenCart_TestCase
class ModelExtensionPaymentMollieIdealTest extends Mollie_OpenCart_TestCase
{
/**
* @var ModelPaymentMollieIdeal
* @var ModelExtensionPaymentMollieIdeal
*/
protected $model;

Expand All @@ -13,7 +13,7 @@ public function setUp()
{
parent::setUp();

$this->model = $this->getMock("ModelPaymentMollieBase", array("getAPIClient", "getIssuers", "getCurrentDate"));
$this->model = $this->getMock("ModelExtensionPaymentMollieBase", array("getAPIClient", "getIssuers", "getCurrentDate"));
$this->model->db = $this->getMock("stub", array("query", "escape", "countAffected"));

// Mock API client.
Expand All @@ -25,10 +25,6 @@ public function setUp()
->method("getAPIClient")
->willReturn($this->client);

$this->model
->method("getIssuersForMethod")
->willReturn(array());

// Mock model methods.
$this->model
->method("getCurrentDate")
Expand Down
6 changes: 5 additions & 1 deletion tests/unittests/translationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ public function testTranslationFilesHaveIdenticalKeys($orig_path)

foreach (self::$LANGUAGES as $language)
{
$lang_path = $path . DIRECTORY_SEPARATOR . $language . DIRECTORY_SEPARATOR . "payment" . DIRECTORY_SEPARATOR . "mollie.php";
$lang_path = $path .
DIRECTORY_SEPARATOR . $language .
DIRECTORY_SEPARATOR . "extension" .
DIRECTORY_SEPARATOR . "payment" .
DIRECTORY_SEPARATOR . "mollie.php";
$_ = array();

include $lang_path;
Expand Down

0 comments on commit bedcbff

Please sign in to comment.