You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
im trying to unit test by codeception, i have installed codception and tests/ folder created under my project directory. But when im calling the service function getting below error
Actual Behavior
Error attached
**[PHPUnit\Framework\Exception] Use of undefined constant PIMCORE_PROJECT_ROOT - assumed 'PIMCORE_PROJECT_ROOT' (this will throw an Error in a future version of PHP)
public function testGetFilesArray()
{
$pdfService = new PdfImportService();
$this->assertFalse($pdfService->getFilesArray());
}
when im executing this test case, its calling constructor of actual service file and there we have defined constant path for the file, but this test case is not working. Actual function from the backend is working
Please let me know how to resolve it.
Thanks in advance
The text was updated successfully, but these errors were encountered:
sorry, but we won't be able to guide you on that topic. Pimcore 6.6 is "End of Life" and not supported by us anymore.
But you could raise your question in our discussions: https://github.com/pimcore/pimcore/discussions
Pimcore version
pimcore 6.6
Steps to reproduce
im trying to unit test by codeception, i have installed codception and tests/ folder created under my project directory. But when im calling the service function getting below error
Actual Behavior
Error attached
**[PHPUnit\Framework\Exception] Use of undefined constant PIMCORE_PROJECT_ROOT - assumed 'PIMCORE_PROJECT_ROOT' (this will throw an Error in a future version of PHP)
#1 src/GenericBundle/Service/PdfImportService.php:31**
File name for test is PdfImportServiceTest.php
public function testGetFilesArray()
{
$pdfService = new PdfImportService();
$this->assertFalse($pdfService->getFilesArray());
}
when im executing this test case, its calling constructor of actual service file and there we have defined constant path for the file, but this test case is not working. Actual function from the backend is working
Please let me know how to resolve it.
Thanks in advance
The text was updated successfully, but these errors were encountered: