forked from Kostanos/EM_DeleteOrder
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch from scrutinizer-ci to travis-ci
add basic test
- Loading branch information
1 parent
566781d
commit 8b0dc39
Showing
14 changed files
with
223 additions
and
12 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
language: php | ||
|
||
php: | ||
- 5.3 | ||
- 5.4 | ||
- 5.5 | ||
|
||
sudo: false | ||
|
||
env: | ||
- MAGENTO_VERSION="1.5.0.1" | ||
- MAGENTO_VERSION="1.6.0.0" | ||
- MAGENTO_VERSION="1.6.1.0" | ||
- MAGENTO_VERSION="1.6.2.0" | ||
- MAGENTO_VERSION="1.7.0.0" | ||
- MAGENTO_VERSION="1.7.0.1" | ||
- MAGENTO_VERSION="1.7.0.2" | ||
- MAGENTO_VERSION="1.8.0.0" | ||
- MAGENTO_VERSION="1.8.1.0" | ||
- MAGENTO_VERSION="1.9.0.0" | ||
- MAGENTO_VERSION="1.9.0.1" | ||
- MAGENTO_VERSION="1.9.1.0" | ||
|
||
before_script: | ||
- mkdir magento/ | ||
- git clone https://github.com/netz98/n98-magerun ./n98-magerun/ | ||
- git clone git://github.com/EcomDev/MageCI.git ./mageci/ | ||
- ./mageci/bin/mage-ci install magento $MAGENTO_VERSION magento_test -c -t -r http://mage-ci.ecomdev.org | ||
- composer update | ||
- git clone git://github.com/EcomDev/EcomDev_PHPUnit.git -b dev ./phpunit/ | ||
- CURR_DIR=$(pwd) | ||
- wget https://raw.githubusercontent.com/colinmollenhour/modman/master/modman -O ./mageci/bin/modman | ||
- chmod +x ./mageci/bin/modman | ||
- ./mageci/bin/mage-ci install-module magento $CURR_DIR/phpunit | ||
- ./mageci/bin/mage-ci install-module magento $CURR_DIR | ||
- composer install --dev | ||
- cd magento | ||
|
||
script: | ||
- ../vendor/bin/phpunit --group EM_DeleteOrder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
class Em_DeleteOrder_Helper_Data extends Mage_Core_Helper_Abstract | ||
{ | ||
/** | ||
* Path for the config for extension active status | ||
*/ | ||
const CONFIG_EXTENSION_ACTIVE = 'system/em_deleteorder/enable'; | ||
|
||
/** | ||
* Variable for if the extension is active | ||
* | ||
* @var bool | ||
*/ | ||
protected $bExtensionActive; | ||
|
||
/** | ||
* Check to see if the extension is active | ||
* | ||
* @return bool | ||
*/ | ||
public function isExtensionActive() | ||
{ | ||
if ($this->bExtensionActive === null) { | ||
$this->bExtensionActive = Mage::getStoreConfigFlag(self::CONFIG_EXTENSION_ACTIVE); | ||
} | ||
return $this->bExtensionActive; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
/** | ||
* Test for class EM_DeleteOrder_Helper_Data | ||
* | ||
* @category EM | ||
* @package EM_DeleteOrder | ||
*/ | ||
class EM_DeleteOrder_Test_Helper_Data extends EcomDev_PHPUnit_Test_Case | ||
{ | ||
/** | ||
* Tests is extension active | ||
* | ||
* @test | ||
* @loadFixture | ||
*/ | ||
public function testIsExtensionActive() | ||
{ | ||
$this->assertTrue( | ||
Mage::helper('em_deleteorder')->isExtensionActive(), | ||
'Extension is not active please check config' | ||
); | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
app/code/community/EM/DeleteOrder/Test/Helper/Data/fixtures/testIsExtensionActive.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
config: | ||
default/system/em_deleteorder/enable: 1 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<?xml version="1.0"?> | ||
<config> | ||
<modules> | ||
<EM_DeleteOrder> | ||
<version>1.0.0</version> | ||
</EM_DeleteOrder> | ||
</modules> | ||
<global> | ||
<helpers> | ||
<em_deleteorder> | ||
<class>EM_DeleteOrder_Helper</class> | ||
</em_deleteorder> | ||
</helpers> | ||
<rewrite> | ||
<em_emadmin_adminhtml_sales_order> | ||
<from><![CDATA[#/admin/sales_order/#]]></from> | ||
<to>/emadmin/adminhtml_sales_order/</to> | ||
</em_emadmin_adminhtml_sales_order> | ||
</rewrite> | ||
<blocks> | ||
<adminhtml> | ||
<rewrite> | ||
<sales_order_grid>EM_DeleteOrder_Block_Adminhtml_Sales_Order_Grid</sales_order_grid> | ||
</rewrite> | ||
</adminhtml> | ||
</blocks> | ||
</global> | ||
<admin> | ||
<routers> | ||
<em_deleteorder> | ||
<use>admin</use> | ||
<args> | ||
<module>EM_DeleteOrder</module> | ||
<frontName>emadmin</frontName> | ||
</args> | ||
</em_deleteorder> | ||
<adminhtml> | ||
<args> | ||
<modules> | ||
<EM_DeleteOrder_Adminhtml before="Mage_Adminhtml">EM_DeleteOrder_Adminhtml</EM_DeleteOrder_Adminhtml> | ||
</modules> | ||
</args> | ||
</adminhtml> | ||
</routers> | ||
</admin> | ||
<default> | ||
<system> | ||
<em_deleteorder> | ||
<enable>0</enable> | ||
</em_deleteorder> | ||
</system> | ||
</default> | ||
<phpunit> | ||
<suite> | ||
<modules> | ||
<EM_DeleteOrder/> | ||
</modules> | ||
</suite> | ||
</phpunit> | ||
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0"?> | ||
<config> | ||
<sections> | ||
<system> | ||
<groups> | ||
<em_deleteorder translate="label" module="em_deleteorder"> | ||
<label>EM_DeleteOrder</label> | ||
<frontend_type>text</frontend_type> | ||
<sort_order>900</sort_order> | ||
<show_in_default>1</show_in_default> | ||
<show_in_website>0</show_in_website> | ||
<show_in_store>0</show_in_store> | ||
<fields> | ||
<enable translate="label,comment"> | ||
<label>Enable EM_DeleteOrder</label> | ||
<frontend_type>select</frontend_type> | ||
<source_model>adminhtml/system_config_source_yesno</source_model> | ||
<sort_order>1</sort_order> | ||
<show_in_default>1</show_in_default> | ||
<show_in_website>0</show_in_website> | ||
<show_in_store>0</show_in_store> | ||
<comment><![CDATA[Enable or disable extension.]]></comment> | ||
</enable> | ||
</fields> | ||
</em_deleteorder> | ||
</groups> | ||
</system> | ||
</sections> | ||
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "ffuenf/EM_DeleteOrder", | ||
"license": "OSL-3.0", | ||
"type": "magento-module", | ||
"require": { | ||
"magento-hackathon/magento-composer-installer": "*", | ||
"colinmollenhour/modman": "*" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "3.7.*" | ||
}, | ||
"repositories": [ | ||
{ | ||
"type": "composer", | ||
"url": "http://packages.firegento.com" | ||
} | ||
], | ||
"extra": { | ||
"magento-root-dir": "./magento/" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
EM/DeleteOrder app/code/community/EM/DeleteOrder | ||
modules/EM_DeleteOrder.xml app/etc/modules/EM_DeleteOrder.xml | ||
app/code/community/EM/DeleteOrder app/code/community/EM/DeleteOrder | ||
app/etc/modules/EM_DeleteOrder.xml app/etc/modules/EM_DeleteOrder.xml |