You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,23 @@
1
1
# PHPSpec Magento 2.0 DI Adapter [](https://travis-ci.org/EcomDev/phpspec-magento-di-adapter?branch=develop)[](https://coveralls.io/github/EcomDev/phpspec-magento-di-adapter?branch=develop)
2
2
3
-
This small PHPSpec extension allows you to test Magento 2.0 modules much more easier by utilizing Factory generators of Magento\Framework\ObjectManager.
3
+
This small PHPSpec extension allows you to test Magento 2.0 modules much more easier by utilizing generators of `Magento\Framework\ObjectManager`.
4
+
5
+
## Why?
6
+
Reasons why not to use `ObjectManager` in PHPSpec examples:
7
+
8
+
1. It is heavy and requires stubbing full file system in order to run a simple spec example.
9
+
2. Depending on ObjectManager is a bad idea, as you don't want to test some-else DI overrides.
10
+
3. Simple modules that do not require database do not need fully functional object manager
11
+
4. Adapting your business logic to another framework will require from you only to materialize generated classes, instead of depending on the whole ObjectManager library.
0 commit comments