Call to undefined function CodeIgniter\Test\helper() for CIUnitTestCase - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Call to undefined function CodeIgniter\Test\helper() for CIUnitTestCase (/showthread.php?tid=80851) |
Call to undefined function CodeIgniter\Test\helper() for CIUnitTestCase - yoshi - 12-24-2021 Summary Call to undefined function CodeIgniter\Test\helper() for CIUnitTestCase I'm trying codeigniter4 testing tutorial. testing-feature PHP Code: // ci4_batches/batches/tests/app/Controllers/TestHome.php phpStorm will be pop up this message. Quote:Method 'call' not found in TestHome Let's Test from phpStorm Quote:Warning: Use of undefined constant SUPPORTPATH - assumed 'SUPPORTPATH' (this will throw an Error in a future version of PHP) in D:\OneDrive\dev\ci4_batches\batches\vendor\phpunit\phpunit\src\Framework\TestBuilder.php on line 138 Why can't I do it? RE: Call to undefined function CodeIgniter\Test\helper() for CIUnitTestCase - sushiguru - 01-20-2022 Did you ever get this to work? RE: Call to undefined function CodeIgniter\Test\helper() for CIUnitTestCase - BilltheCat - 01-20-2022 https://codeigniter.com/user_guide/cli/cli_commands.html?highlight=call#call RE: Call to undefined function CodeIgniter\Test\helper() for CIUnitTestCase - iRedds - 01-20-2022 The call method is defined in the CodeIgniter\Test\FeatureTestTrait trait but you didn't add it. RE: Call to undefined function CodeIgniter\Test\helper() for CIUnitTestCase - yoshi - 03-25-2022 (01-20-2022, 03:37 AM)sushiguru Wrote: Did you ever get this to work? (01-20-2022, 04:41 AM)BilltheCat Wrote: https://codeigniter.com/user_guide/cli/cli_commands.html?highlight=call#call (01-20-2022, 09:11 AM)iRedds Wrote: The call method is defined in the CodeIgniter\Test\FeatureTestTrait trait but you didn't add it. I found it while organizing past posts. I can't remember exactly what I detail, but the reason I wasn't able to test with PHPStorm is probably that I didn't specify the interpreter as phpunit. Thank you everyone. |