Skip to content
Browse files

Config changes to reflect doctrineModule PR 95. Still WIP. Almost done

  • Loading branch information...
1 parent cc3f1aa commit fbd5e63878df1fc79133aecc2e12f3fda6c65c28 @superdweebie committed Oct 2, 2012
View
29 src/DoctrineMongoODMModule/Module.php
@@ -99,15 +99,40 @@ public function getConfig()
/**
* {@inheritDoc}
*/
+ public function getControllerPluginConfig()
+ {
+ return array(
+ 'factories' => array(
+ 'identity' => new CommonService\Authentication\ControllerPluginFactory('odm_default')
+ )
+ );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getViewHelperConfig()
+ {
+ return array(
+ 'factories' => array(
+ 'identity' => new CommonService\Authentication\ViewHelperFactory('odm_default')
+ )
+ );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public function getServiceConfig()
{
return array(
'aliases' => array(
'Doctrine\ODM\Mongo\DocumentManager' => 'doctrine.documentmanager.odm_default',
),
'factories' => array(
- 'doctrine.authenticationadapter.odm_default' => new CommonService\AuthenticationAdapterFactory('odm_default'),
- 'doctrine.authenticationstorage.odm_default' => new CommonService\AuthenticationStorageFactory('odm_default'),
+ 'doctrine.authenticationadapter.odm_default' => new CommonService\Authentication\AdapterFactory('odm_default'),
+ 'doctrine.authenticationstorage.odm_default' => new CommonService\Authentication\StorageFactory('odm_default'),
+ 'doctrine.authenticationservice.odm_default' => new CommonService\Authentication\ServiceFactory('odm_default'),
'doctrine.connection.odm_default' => new ODMService\ConnectionFactory('odm_default'),
'doctrine.configuration.odm_default' => new ODMService\ConfigurationFactory('odm_default'),
'doctrine.driver.odm_default' => new CommonService\DriverFactory('odm_default'),
View
3 tests/DoctrineMongoODMModuleTest/Doctrine/AuthenticationAdapterFactoryTest.php
@@ -3,13 +3,12 @@
namespace DoctrineMongoODMModuleTest\Doctrine;
use DoctrineMongoODMModuleTest\AbstractTest;
-use Zend\Authentication\Adapter\AdapterInterface;
class AuthenticationAdapterFactoryTest extends AbstractTest
{
public function testAuthenticationAdapterFactory(){
$adapter = $this->serviceManager->get('doctrine.authenticationadapter.odm_default');
- $this->assertTrue($adapter instanceof AdapterInterface);
+ $this->assertInstanceOf('Zend\Authentication\Adapter\AdapterInterface', $adapter);
}
}
View
14 tests/DoctrineMongoODMModuleTest/Doctrine/AuthenticationServiceFactoryTest.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace DoctrineMongoODMModuleTest\Doctrine;
+
+use DoctrineMongoODMModuleTest\AbstractTest;
+
+class AuthenticationServiceFactoryTest extends AbstractTest
+{
+ public function testAuthenticationStorageFactory(){
+
+ $storage = $this->serviceManager->get('doctrine.authenticationservice.odm_default');
+ $this->assertInstanceOf('Zend\Authentication\AuthenticationService', $storage);
+ }
+}
View
3 tests/DoctrineMongoODMModuleTest/Doctrine/AuthenticationStorageFactoryTest.php
@@ -3,13 +3,12 @@
namespace DoctrineMongoODMModuleTest\Doctrine;
use DoctrineMongoODMModuleTest\AbstractTest;
-use Zend\Authentication\Storage\StorageInterface;
class AuthenticationStorageFactoryTest extends AbstractTest
{
public function testAuthenticationStorageFactory(){
$storage = $this->serviceManager->get('doctrine.authenticationstorage.odm_default');
- $this->assertTrue($storage instanceof StorageInterface);
+ $this->assertInstanceOf('Zend\Authentication\Storage\StorageInterface', $storage);
}
}

0 comments on commit fbd5e63

Please sign in to comment.
Something went wrong with that request. Please try again.