Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unit test case getting error on constant PIMCORE_PROJECT_ROOT - assumed 'PIMCORE_PROJECT_ROOT' #16361

Closed
Thejaswini-Rao-U opened this issue Dec 12, 2023 · 1 comment
Labels

Comments

@Thejaswini-Rao-U
Copy link

Thejaswini-Rao-U commented Dec 12, 2023

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

@wisconaut
Copy link
Contributor

Hi @Thejaswini-Rao-U,

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

Kind regards.

@wisconaut wisconaut closed this as not planned Won't fix, can't repro, duplicate, stale Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants