I've followed the documentation provided here http://octobercms.com/docs/help/unit-testing#testing-plugins 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.
/var/www/true/modules/system/console/PluginRefresh.php:43
/var/www/true/vendor/laravel/framework/src/Illuminate/Container/Container.php:507
/var/www/true/vendor/laravel/framework/src/Illuminate/Console/Command.php:150
/var/www/true/vendor/symfony/console/Command/Command.php:254
/var/www/true/vendor/laravel/framework/src/Illuminate/Console/Command.php:136
/var/www/true/vendor/symfony/console/Application.php:846
/var/www/true/vendor/symfony/console/Application.php:190
/var/www/true/vendor/symfony/console/Application.php:121
/var/www/true/vendor/laravel/framework/src/Illuminate/Console/Application.php:64
/var/www/true/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:159
/var/www/true/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:217
/var/www/true/tests/PluginTestCase.php:151
/var/www/true/tests/PluginTestCase.php:74
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 'rainlab.blog' 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!