This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

matthias16791
matthias16791

Hi all,

Quick question on unit testing in OctoberCMS. I followed the tutorial https://octobercms.com/docs/help/unit-testing to implement a real simple unit test with only one assertion. The unit test is executed in my custom plugin. However, it throws the following exception:

Fatal error: Class 'App' not found in /modules/system/Classes/PluginManager.php on line 82 It seems that the Application class is not loaded by the test environment. I was wondering what might be the reason for this and how to solve it?

Thanks for you support! Cheers, Matt

daftspunky
daftspunky

Looks like the framework is not booting in your tests. I think the translate plugin has some tests you can reference: https://github.com/rainlab/translate-plugin

matthias16791
matthias16791

Thanks! Based on the reference I was able to nail it down. There was an error in the config files.

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.