I add "digitalpianism/testframework": "dev-master" to my composer.json and do all instructions in README, but when I try to run my test from console I get error
$ phpunit -c vendor/popov/magento-magmi-import/app/code/local/Popov/Magmi/Test/phpunit.xml
Warning: require_once(D:\WebServer\git\art-market\vendor\digitalpianism\testframework\lib\DigitalPianism\TestFramework\Helper/../../../../app/Mage.php): failed to open stream: No such file or directory in D:\WebServer\git\art-market\vendor\digitalpianism\testfr
amework\lib\DigitalPianism\TestFramework\Helper\Magento.php on line 39
Fatal error: require_once(): Failed opening required 'D:\WebServer\git\art-market\vendor\digitalpianism\testframework\lib\DigitalPianism\TestFramework\Helper/../../../../app/Mage.php' (include_path='.;d:/openserver/modules/php/PHP-7-x64;d:/openserver/modules/ph
p/PHP-7-x64/PEAR/pear') in D:\WebServer\git\art-market\vendor\digitalpianism\testframework\lib\DigitalPianism\TestFramework\Helper\Magento.php on line 39
My bootstrap.php look like this
require __DIR__ . '/../../../../../../../../../htdocs/lib/DigitalPianism/TestFramework/Helper/Magento.php';
DigitalPianism_TestFramework_Helper_Magento::bootstrap();
Problem is that code in vendor/digitalpianism/testframework/lib/DigitalPianism/TestFramework/Helper/Magento.php use path relative to original Magento directory lib/ but in my case this is path relative to Composer directory vendor/.
As possible solution can to use package https://github.com/joshdifabio/composed for getting variable magento-root-dir from composer.json and based on this variable get path to app/Mage.php. But I didn't do that, maybe you have better solution.
I add
"digitalpianism/testframework": "dev-master"to my composer.json and do all instructions in README, but when I try to run my test from console I get errorMy
bootstrap.phplook like thisProblem is that code in
vendor/digitalpianism/testframework/lib/DigitalPianism/TestFramework/Helper/Magento.phpuse path relative to original Magento directorylib/but in my case this is path relative to Composer directoryvendor/.As possible solution can to use package https://github.com/joshdifabio/composed for getting variable
magento-root-dirfromcomposer.jsonand based on this variable get path toapp/Mage.php. But I didn't do that, maybe you have better solution.