0

When trying to load a source file with an absolute namespace \Blah; declaration from PHPUnit, the loading fails:

Fatal error: Undefined constant 'Blah' in C:\path\to\file.php on line 3

Call Stack:
...

How can I fix this ?

1 Answer 1

1

Searching the internet, I found a solution suggested by Eric Hogue on Twitter:
Use a relative namespace declaration, i.e. namespace \Blah; becomes

namespace Blah;

https://twitter.com/JeremyKendall/status/294956904067780610

Sign up to request clarification or add additional context in comments.

1 Comment

PHPUnit 4.8 also needs it to be like that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.