Skip to content
Snippets Groups Projects
Select Git revision
  • 0240732bc69d8667a3ba8dd13389d8bd7bf98205
  • master default protected
  • 5.x
  • ll-php8-bs5
  • release_5_bs5
  • ll-php8
  • 4.x
  • laminas_migration
  • release_1.0.0.2
  • release_4.0.0
  • release_3.2.8
  • bootstrap4_migration
  • 1.0.0.3
  • 6.0.7
  • 6.0.6
  • 6.0.5
  • 6.0.4
  • 6.0.3
  • 6.0.2
  • 6.0.1
  • 5.1.1
  • 6.0.0
  • 5.1.0
  • 5.0.0
  • 4.0.2
  • 3.2.11
  • 4.0.1
  • 3.2.10
  • 4.0.0
  • 1.0.0.2
  • 3.2.9
  • 3.2.8
32 results

AuthenticationServiceFactoryTest.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);
        }
    }