#StackBounty: #magento2 #controllers #unit-tests #framework Class 'MagentoTestFrameworkTestCaseAbstractController' not found…

Bounty: 100

I tried to make a unit test for my custom module like this:


namespace MyCompanyUnitTestController;

class SpinTest extends MagentoTestFrameworkTestCaseAbstractController
    public function testLogin()
        $params = [
          'customer_id' => '3'
        $result = $this->getResponse()->getBody();
        $this->assertEquals('200', $result['status']);

and ran the unit from terminal:

vendor/phpunit/phpunit/phpunit -c dev/tests/unit/phpunit.xml.dist app/code/MyCompany/UnitTest/Test/Unit/Controller/

but i got an error like this:

Class ‘MagentoTestFrameworkTestCaseAbstractController’ not found in
on line 4

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.