Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Magento 1.7/1.8 Unittest Sample Module Using Makefile, Composer, Modman, PHPUnit for easy to setup CI

Notifications You must be signed in to change notification settings

BSolut/magento_phpunit_unittest_base_module

Repository files navigation

Magento Module PHPUnit Unittest Example Stub

This magento module provides a stub for a magento module with ready to go phpunit unittest capabilities by combining multiple exising open source project projects.

Build Status

Requirements

  • PHP 5.3+
  • *nix (make, curl)

Installation

It is ready to be forked module stub. The module itself can be easily installed via modman or composer on a composer/modman ready magento. The testing itself is using modman to install the module to a magento which also will be automaticly installed during the testing process to a local module subdirectory - this requires a working modman config even if you plan to use the module with composer only later.

Running the Tests

make

This will:

  • download composer
  • run composer to install magetest/magento-phpunit-extension, n98-magerun, modman, phpunit
  • install a magento (using the db connection details from the makefile)
  • install the magetest/magento-phpunit-extension module to magento using modman (copy mode)
  • install some missing files from magento-phpunit-extension to magento using modman (copy mode)
  • install the module itself to magento using modman (symlink)
  • run the magento-phpunit-extension default unit tests

How it works

The Stub combines multiple project.

How to start customisation

Config

There is special composer config where you should think about putting in your own github-oauth key. The preferred-install is set to make as little as possible github api calls.

 "config": {
        "bin-dir": "bin",
        "preferred-install": "dist",
        "github-protocols:": ["https", "ssh", "git"],
        "github-oauth": {"github.com": "xxxxx"},
        "cache-files-maxsize": "2048MiB"
    },
    

About

Magento 1.7/1.8 Unittest Sample Module Using Makefile, Composer, Modman, PHPUnit for easy to setup CI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published