LogicException: getItemPath returned null for ClassName

When writing unit tests, sometimes you have a hard time to get them working. Today the error "LogicException: getItemPath returned null for ClassName" drove me crazy, but I found a solution.

The error occured on a new test i renamed during testing which uses fixtures. Even a "sake dev/build ?flush=1" in cli didn't help. While asking my favourite search engine I found, someone else had the same problem in IRC and found the solution:

phpunit path/to/MyTest.php '' db=sqlite3 flush=1

finally flushed, took some time but solved this problem.

Rate this post

Post your comment


  • Mo 07/06/2017 12:51pm (7 years ago)

    This was bugging me as well, didn't realise you can flush from a PHP Unit call in SS.

RSS feed for comments on this page | RSS feed for all comments