Skip to content

Commit

Permalink
Fix the unittests :trollface:
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Jacobs committed May 17, 2016
1 parent 96d61ee commit 5be6256
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
6 changes: 2 additions & 4 deletions tests/phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
<?xml version="1.0"?>
<phpunit bootstrap="bootstrap.php" backupStaticAttributes="false" colors="true">
<testsuites>
<testsuite name="mollie magento plugin tests">
<testsuite name="Mollie Magento 1">
<directory>.</directory>
</testsuite>
</testsuites>
<logging>
<log type="junit" target="../build/logs/junit-unittests.xml" logIncompleteSkipped="false"/>
<log type="coverage-html" target="../build/coverage" charset="UTF-8"
yui="true" highlight="true"
lowUpperBound="35" highLowerBound="70"/>
<log type="coverage-html" target="../build/coverage" charset="UTF-8" yui="true" highlight="true" lowUpperBound="35" highLowerBound="70"/>
<log type="coverage-clover" target="../build/clover/clover-unittests.xml"/>
</logging>
<filter>
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/Helper/ApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected function setUp()
->method("Helper")
->will($this->returnValueMap(
array(
array('mpm/data', $this->data),
array('mpm', $this->data),
array('core', new Mage_Core_Helper_Data()),
)
));
Expand Down
6 changes: 3 additions & 3 deletions tests/unittests/Helper/DataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected function setUp()

$this->mage->expects($this->any())
->method("Helper")
->with("mpm/data")
->with("mpm")
->will($this->returnValue($this->HelperData));

$this->resource = $this->getMock("stdClass", array("getConnection", "getTableName"));
Expand Down Expand Up @@ -95,7 +95,7 @@ public function testGetVersion()
<depends>
<Mage_Payment />
</depends>
<version>4.0.0</version>
<version>4.2.2</version>
</Mollie_Mpm>
</modules>
');
Expand All @@ -109,7 +109,7 @@ public function testGetVersion()
->method("getConfig")
->will($this->returnValue($config));

$this->assertEquals("4.0.0", $this->HelperData->getModuleVersion());
$this->assertEquals("4.2.2", $this->HelperData->getModuleVersion());
}

public function testGetStatusById()
Expand Down
4 changes: 2 additions & 2 deletions tests/unittests/Model/ApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function setUp()
$this->mage->expects($this->any())
->method("Helper")
->will($this->returnValueMap(array(
array("mpm/data", $this->datahelper),
array("mpm", $this->datahelper),
array("mpm/api", $this->apihelper),
)));

Expand Down Expand Up @@ -82,7 +82,7 @@ public function testIsNotAvailableIfDisabledInAdmin()
{
$this->datahelper->expects($this->once())
->method("getConfig")
->with("mollie","active")
->with("mollie", "active")
->will($this->returnValue(FALSE));

$model = new Mollie_Mpm_Model_Api();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function setUp()
$this->mage->expects($this->any())
->method("Helper")
->will($this->returnValueMap(array(
array("mpm/data", $this->data_helper),
array("mpm", $this->data_helper),
array("mpm/api", $this->api_helper),
array("directory", $this->directory),
)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function setUp()
$this->mage->expects($this->any())
->method("Helper")
->will($this->returnValueMap(array(
array("mpm/data", $this->datahelper),
array("mpm", $this->datahelper),
)));

$this->order = $this->getMock("Mage_Sales_Model_Order", array("getData", "setPayment", "getGrandTotal", "getAllItems", "setState", "sendNewOrderEmail", "setEmailSent", "cancel", "save"));
Expand Down

0 comments on commit 5be6256

Please sign in to comment.