I've followed the documentation provided here and have a phpunit.xml file along with my tests directory which contains a single Test.php.

All I'm attempting to do is run a single 'fake' test to establish everything is setup and working, however I get the following error.

Time: 1.02 seconds, Memory: 22.00MB

There was 1 error:

1) Daykin\True\Tests\Test::testExample
InvalidArgumentException: Plugin "Daykin.True" not found.


Whilst attempted to debug the error, I've found that my plugin which I'm testing, Daykin.True, is being disabled which is why the plugin refresh fails.

I've debugged PluginTestCase.php at line 150 before Artisan::call('plugin:refresh', ['name' => $code]); is executed with the following:

// $code = 'Daykin.True'
dump(PluginManager::instance()->isDisabled($code)); // false

My plugin requires '' as a dependency using the public $require property in my plugin, so the above debug prints out false twice as any plugin dependencies are refreshed first.

Finally, if I print out the same debug code in PluginRefresh.php before line 43 where the Exception is thrown, it returns false for Rainlab.Blog then true for Daykin.True - indicating my plugin is disabled.

Any help would be greatly appreciated!


I've now solved this.

Be sure to declare you plugin dependencies in correct camel case - otherwise your plugin will be disabled automatically!

[''] // nope
['RainLab.Blog'] // yep

Yep that strict namespace will get you every time :/


This will be fixed in Build 389 onwards: Plugin dependency definitions will no longer be case sensitive.

Commit reference:


following the documentation, i must be missing something, i have this error

php vendor/bin/phpunit
PHPUnit 4.7.7-1-g3467f3b by Sebastian Bergmann and contributors.

Cannot open file "/Users/abcd/Sites/project/site/plugins/acme/project/../../../tests/bootstrap.php".

1-5 of 5