Skip to content
Snippets Groups Projects
Select Git revision
  • c7e1fd0f4e978cc91bb7c3d7574a636bdd63b9e3
  • master default protected
  • unicaen_authentification
  • 4.x
  • 6.2.0
  • 6.1.0
  • 6.0.0
  • 5.0.1
  • 5.0.0
  • 4.0.2
  • 4.0.1
  • 4.0.0
  • 3.0.0
  • 1.0.4
  • 1.0.3
  • 1.0.2
  • 1.0.1
  • 1.0.0
18 results

AbstractControllerTestCase.php

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    AuthenticationServiceFactoryTest.php 1.09 KiB
    <?php
    
    namespace UnicaenAuthTest\Authentication;
    
    use UnicaenAppTest\BaseServiceFactoryTest;
    
    /**
     * Description of ModuleOptionsFactoryTest
     *
     * @author Bertrand GAUTHIER <bertrand.gauthier at unicaen.fr>
     */
    class ModuleOptionsFactoryTest extends BaseServiceFactoryTest
    {
        protected $factoryClass = 'UnicaenAuth\Authentication\AuthenticationServiceFactory';
        protected $serviceClass = 'Laminas\Authentication\AuthenticationService';
    
        public function testCanCreateService()
        {
            $storage = $this->createMock('UnicaenAuth\Authentication\Storage\Chain');
            $adapter = $this->createMock('ZfcUser\Authentication\Adapter\AdapterChain');
    
            $this->serviceManager->expects($this->exactly(2))
                    ->method('get')
                    ->will($this->returnValueMap([
                        ['UnicaenAuth\Authentication\Storage\Chain', $storage],
                        ['ZfcUser\Authentication\Adapter\AdapterChain', $adapter],
                    ]));
    
            $service = $this->factory->__invoke($this->serviceManager, '');
    
            $this->assertInstanceOf($this->serviceClass, $service);
        }
    }