Welcome Guest, Not a member yet? Register   Sign In
Undefined constant SUPPORTPATH"
#1

Hi All,
When I run ./phpunit from the terminal in the app directory of my project then it runs properly


But when I run it from PHPStorm 2022.2.4 I get the following error:
Code:
/usr/local/Cellar/php/8.1.12/bin/php /Users/wclark/Sites/option-chain/www/vendor/phpunit/phpunit/phpunit --no-configuration /Users/wclark/Sites/option-chain/www/ --teamcity --cache-result-file=/Users/wclark/Sites/option-chain/.phpunit.result.cache
Testing started at 1:19 pm ...
PHP Fatal error:  Uncaught Error: Undefined constant "CodeIgniter\Test\SUPPORTPATH" in /Users/wclark/Sites/option-chain/www/vendor/phpunit/phpunit/src/Framework/TestBuilder.php:138
Stack trace:
#0 /Users/wclark/Sites/option-chain/www/vendor/phpunit/phpunit/src/Framework/TestBuilder.php(117): PHPUnit\Framework\TestBuilder->buildTestWithoutData('Tests\\Support\\M...')
#1 /Users/wclark/Sites/option-chain/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(881): PHPUnit\Framework\TestBuilder->build(Object(ReflectionClass), 'testcalcMidPric...')
#2 /Users/wclark/Sites/option-chain/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(231): PHPUnit\Framework\TestSuite->addTestMethod(Object(ReflectionClass), Object(ReflectionMethod))
#3 /Users/wclark/Sites/option-chain/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(361): PHPUnit\Framework\TestSuite->__construct(Object(ReflectionClass))
#4 /Users/wclark/Sites/option-chain/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(502): PHPUnit\Framework\TestSuite->addTestSuite(Object(ReflectionClass))
#5 /Users/wclark/Sites/option-chain/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(527): PHPUnit\Framework\TestSuite->addTestFile('/Users/wclark/S...')

Any suggestions are appreciated.
Reply
#2

(12-18-2022, 11:16 PM)wclark Wrote: [code]/usr/local/Cellar/php/8.1.12/bin/php /Users/wclark/Sites/option-chain/www/vendor/phpunit/phpunit/phpunit --no-configuration /Users/wclark/Sites/option-chain/www/ --teamcity --cache-result-file=/Users/wclark/Sites/option-chain/.phpunit.result.cache

--no-configuration

You need to set the configuration file.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB