2017 © Pedro Peláez
 

magento-module techdivision_magentounittesting

This projects aims to bring the core tests and the important parts of the Magento 2 testsuite to Magento 1.

image

techdivision/techdivision_magentounittesting

This projects aims to bring the core tests and the important parts of the Magento 2 testsuite to Magento 1.

  • Monday, September 12, 2016
  • by wagnert
  • Repository
  • 24 Watchers
  • 56 Stars
  • 80 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 38 Forks
  • 5 Open issues
  • 3 Versions
  • 3 % Grown

The README.md

PHPUnit based testsuite for Magento 1

This project aims to bring the core tests and the important parts of the Magento 2 testsuite to Magento 1., (*1)

Please refer to the blog post (German) for further information., (*2)

With the TechDivision_MagentoUnitTesting framework located at src/dev/tests/unit/framework is it possible to reach 100% unit test coverage for Magento 1., (*3)

How to use

Installation

Copy the whole content of the src directory to your Magento project., (*4)

composer install
cp -R src/* <YOUR_MAGENTO_ROOT_DIRECTORY>

Configuration

We recommend to create an own phpunit xml file if you want write tests only for your own module. You will find an example file (phpunit.xml.dev) in src/dev/tests/unit/ directory, which is a good beginning. That example xml also includes the html coverage report which is a must-have while writing your tests., (*5)

Execution

Execute your tests with the following command:, (*6)

cd <YOUR_MAGENTO_ROOT_DIRECTORY>
php dev/tests/phpunit-3.7.37.phar -c dev/tests/unit/phpunit.xml.dev

Replace dev/tests/unit/phpunit.xml.dev with your own xml file, if you create one., (*7)

To display the coverage report browse the following url:, (*8)

<YOUR-MAGENTO-HOST>/coverage/index.html

Writing tests

To use the framework you have to extend your test classes from TechDivision_MagentoUnitTesting_TestCase_Abstract or an other testcase class which is extended from the abstract class. All testcases are located at src/dev/tests/unit/framework/TechDivision/MagentoUnitTesting/TestCase, (*9)

Documentation for testing framework

https://github.com/techdivision/TechDivision_MagentoUnitTesting/wiki, (*10)

Feel free to open an issue., (*11)

The Versions

12/09 2016

dev-github

dev-github https://github.com/techdivision/TechDivision_MagentoUnitTesting

This projects aims to bring the core tests and the important parts of the Magento 2 testsuite to Magento 1.

  Sources   Download

OSL-3.0

The Requires

 

12/09 2016

v1.0.1

1.0.1.0 https://github.com/techdivision/TechDivision_MagentoUnitTesting

This projects aims to bring the core tests and the important parts of the Magento 2 testsuite to Magento 1.

  Sources   Download

OSL-3.0

The Requires

 

02/08 2016

v1.0.0

1.0.0.0 https://github.com/techdivision/TechDivision_MagentoUnitTesting

This projects aims to bring the core tests and the important parts of the Magento 2 testsuite to Magento 1.

  Sources   Download

OSL-3.0

The Requires