2017 © Pedro Peláez
 

magento-module ecomdev_phpunit

Magento PHPUnit Integration

image

ambimax/ecomdev_phpunit

Magento PHPUnit Integration

  • Saturday, February 17, 2018
  • by tschifftner
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 173 Forks
  • 0 Open issues
  • 13 Versions
  • 0 % Grown

The README.md

EcomDev, (*1)

Magento PHPUnit Integration

Magento is a quite complex platform without built in unit test suite, so the code is not oriented on running tests over it., (*2)

This extension was created especially for resolving this problem and promoting test driven development practices in Magento developers community. It doesn't change core files or brake your Magento instalment database, because all the system objects are replaced during the run-time with the test ones and a separate database connection is used for tests., (*3)

System Requirements

  • PHP 5.3 or higher
  • PHPUnit 3.7.x
  • Magento CE1.4.x-1.7.x/PE1.9.x-PE1.10.x/EE1.9.x-1.12.x

Build Status

  • Latest Release: Master Branch
  • Development Branch: Development Branch

Documentation

Also you may follow our related blogposts., (*4)

Installation

  1. There are two ways of obtaining the extension:, (*5)

    • Use Module Manager, (*6)

      modman clone git://github.com/EcomDev/EcomDev_PHPUnit.git 
      
    • Add extension as dependency in your composer.json to install it from Magento Composer Repository json { "require": { "ecomdev/ecomdev_phpunit": "*" } }
  2. Open your terminal and navigate to your magento directory for performing the following command, they are required to configure system for running the test suite, (*7)

    # Shell scripts needs to be run from this directory
    cd $YOUR_MAGENTO_DIRECTORY/shell 
    # Specify your test database name and base url for controller tests
    php ecomdev-phpunit.php -a magento-config --db-name $DB_NAME --base-url http://your.magento.url/
    

    If you receive a warning on PHPUnit checks for optional packages, run the following command, (*8)

    php ecomdev-phpunit.php -a fix-autoloader
    
  3. Run the unit tests first time for installing test database. It will take about 3 minutes., (*9)

    $ phpunit 
  4. If it shows that there was no tests found, it means that extension was successfully installed. If it shows some errors, then it means, that your customizations has install scripts that relay on your current database data and you should fix them. Or use your dev database as a base for the tests, but prior first time running the suite., (*10)

Issue Tracker

We use github issue tracker only for contributions management. If you want to post an issue please use our Issue Tracker, (*11)

Contributions

If you want to take a part in improving our extension please create branches based on dev one., (*12)

Create your contribution branch:

$ git checkout -b [your-name]/[feature] dev

Then submit them for pull request., (*13)

The Versions

25/02 2014

dev-feature/refactor-fixtures

dev-feature/refactor-fixtures http://www.ecomdev.org/shop/code-testing/php-unit-test-suite.html

Magento PHPUnit Integration

  Sources   Download

OSL-3.0

The Requires

 

22/03 2013

dev-feature/refactor-eav-fixture

dev-feature/refactor-eav-fixture http://www.ecomdev.org/shop/code-testing/php-unit-test-suite.html

Magento PHPUnit Integration

  Sources   Download

OSL-3.0

The Requires