I tried to run a unit but failed with the following error.
My test class
<?php
namespace Vendor\Module\Test\Unit\Observer;
class CheckoutOnepageControllerSuccessActionObserverTest extends \PHPUnit_Framework_TestCase {
public function testExecute() {
$this->assertTrue(false);
}
}
I run the phpunit command at /dev/tests/unit/
phpunit --filter CheckoutOnepageControllerSuccessActionObserverTest
It returns the following errors
PHP Fatal error: Call to protected method PHPUnit_Framework_TestCase::getMockForAbstractClass() from context 'Magento\Framework\TestFramework\Unit\Helper\ObjectManager' in /vendor/magento/framework/TestFramework/Unit/Helper/ObjectManager.php on line 139
Fatal error: Call to protected method PHPUnit_Framework_TestCase::getMockForAbstractClass() from context 'Magento\Framework\TestFramework\Unit\Helper\ObjectManager' in /vendor/magento/framework/TestFramework/Unit/Helper/ObjectManager.php on line 139