/**
  * This is required due to the fact that the ServiceManager catches ALL exceptions and throws it's own...
  */
 public function testThrowExceptionIfNoObjectManagerNorObjectRepositoryIsSet()
 {
     try {
         $pluginManager = new RoleProviderPluginManager();
         $serviceManager = new ServiceManager();
         $pluginManager->setServiceLocator($serviceManager);
         $pluginManager->get('ZfjRbac\\Role\\ObjectRepositoryRoleProvider', ['role_name_property' => 'name']);
     } catch (ServiceNotCreatedException $smException) {
         while ($e = $smException->getPrevious()) {
             if ($e instanceof RuntimeException) {
                 return true;
             }
         }
     }
     $this->fail('ZfjRbac\\Factory\\ObjectRepositoryRoleProviderFactory::createService() :: ' . 'ZfjRbac\\Exception\\RuntimeException was not found in the previous Exceptions');
 }
 public function testValidationOfPluginFailsIfRoleProviderInterfaceIsNotImplemented()
 {
     $this->setExpectedException('ZfjRbac\\Exception\\RuntimeException');
     $pluginManager = new RoleProviderPluginManager();
     $pluginManager->get('stdClass', []);
 }