FrozenNode/Laravel-Administrator — pull request #448 by edhahn (2014-01-09 22:40:17+00:00)
Title:  Prevent class redeclaration errors in Laravel 4.1 phpunit tests

Added class_exists check to AdministratorServiceProvider boot to prevent redefinition of AdministratorBaseController alias. This prevents the following error in Laravel 4.1 phpunit tests:

ErrorException: Cannot redeclare class AdministratorBaseController

/Users/ed/Dev/Gloo/portal-v2/vendor/frozennode/administrator/src/Frozennode/Administrator/AdministratorServiceProvider.php:38
/Users/ed/Dev/Gloo/portal-v2/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:496
/Users/ed/Dev/Gloo/portal-v2/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:496
/Users/ed/Dev/Gloo/portal-v2/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:48
/Users/ed/Dev/Gloo/portal-v2/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:31
/Users/ed/Dev/Gloo/portal-v2/app/tests/TestCase.php:23