Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [unit-tests]

Denotes questions related to unit testing on Magento.

Filter by
Sorted by
Tagged with
5
votes
1answer
857 views

Test Driven Development with Magento

I am interested in unit testing in magento and have started looking at the ecomdev module. However, i dont think it is going to be possible to do full tdd with magento. For the following scenarios ...
1
vote
1answer
954 views

Pointers to write unit test cases using EcomDev_PHPUnit

I am trying to implement a web service client for one of my module and I would like to test it using EcomDev_PHPUnit. So, I have a "Test" folder inside my module with following structure... - ...
18
votes
3answers
796 views

EcomDev_PHPUnit set up in Magento EE 1.13

I am trying to set up EComDev_PHPUnit in EE 1.13 as per the instructions in https://github.com/EcomDev/EcomDev_PHPUnit Well first hurdle was to get modman working but I gave up and copied over the ...
3
votes
1answer
600 views

Magento 2 Tests in Magento

We are looking to start using testing for our builds and are looking at the best tools to use. I noticed there is a port of the Magento 2 tests https://github.com/techdivision/...
2
votes
2answers
3k views

How run unittest using EcomDev_PHPUnit module?

Here is described old version: http://www.ecomdev.org/2011/02/01/phpunit-and-magento-yes-you-can.html And they wrote that I need call phpunit UnitTests.php But I have magento v.1.7. I downloaded ...
6
votes
1answer
2k views

Magento and PHPUnit Mocking Mage::getStoreConfig()

I am writing unit tests using the EcomDev PHPUnit extension. When trying to provide values to the Mage::getStoreConfig() method using a fixture, I am not getting the value from my fixture, but the ...
6
votes
2answers
3k views

How to avoid redirection to “enable-cookies” page during controller unit test?

I'm doing a very simple controller test using Ecomdev_PHPUnit: class Foo_BarWishlist_Test_Controller_IndexController extends EcomDev_PHPUnit_Test_Case_Controller { /** * @test * @...
16
votes
3answers
1k views

Magento 1 Testing Frameworks

Wherever I can, I like to develop software following a Test Driven Development (TDD) approach. Usually, in PHP that means using PHPUnit. Ideally, I would like to write both fine and coarse-grained ...