Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aydinhassan/magento-extension-base
A starting point for a Magento module, including Composer & Unit testing configuration
https://github.com/aydinhassan/magento-extension-base
Last synced: 12 days ago
JSON representation
A starting point for a Magento module, including Composer & Unit testing configuration
- Host: GitHub
- URL: https://github.com/aydinhassan/magento-extension-base
- Owner: AydinHassan
- License: mit
- Created: 2014-12-09T11:29:24.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-09-02T09:26:20.000Z (about 9 years ago)
- Last Synced: 2024-11-01T17:42:24.019Z (19 days ago)
- Language: PHP
- Size: 266 KB
- Stars: 10
- Watchers: 4
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Base Magento Extension
Pre-configured repository for building a Magento extension. Provides `Composer` configuration and common
`Composer` dependencies.## Setup
First, create a repository for your extension, then run the following commands:
$ git clone https://github.com/AydinHassan/magento-extension-base your-ext-name
$ cd your-ext-name
$ php build.php
Follow the instructions and that's it!, an initial commit will be made for your and your remote added. You can then
run `git push` whenever you are ready.## Module Structure
After following the setup the module created will have the following structure.
```
├── LICENSE
├── README.md
├── app
│ ├── code
│ │ └── community
│ │ └── AydinHassan
│ │ └── Parrot
│ │ ├── Block
│ │ ├── Helper
│ │ ├── Model
│ │ ├── controllers
│ │ ├── etc
│ │ │ └── config.xml
│ │ └── sql
│ │ └── aydinhassan_parrot_setup
│ ├── design
│ │ ├── adminhtml
│ │ │ └── default
│ │ │ └── default
│ │ │ ├── layout
│ │ │ │ └── aydinhassan
│ │ │ └── template
│ │ │ └── aydinhassan
│ │ │ └── parrot
│ │ └── frontend
│ │ └── base
│ │ └── default
│ │ ├── layout
│ │ │ └── aydinhassan
│ │ └── template
│ │ └── aydinhassan
│ │ └── parrot
│ └── etc
│ └── modules
│ └── AydinHassan_Parrot.xml
├── composer.json
├── composer.lock
├── phpunit.xml
├── skin
│ └── frontend
│ └── base
│ └── default
│ └── js
│ └── aydinhassan
│ └── parrot
└── test
├── bootstrap.php
└── parrot
└── DemoTest.php
```## Unit Tests
We are using [Aspect Mock](https://github.com/Codeception/AspectMock) which uses [Go! AOP](https://github.com/lisachenko/go-aop-php)
to be able to create test doubles for static method calls. This is required due to Magento relying heavily on static
calls to the `Mage` class.Unit tests should be a core part of any project so it's recommended to read up on [Aspect Mock](https://github.com/Codeception/AspectMock)
and keep your project up to date as it is still in Alpha!