public function testListsCombinedAuthenticationTypes() { $types = ['foo']; $customTypes = ['bar']; $this->listener->addAuthenticationTypes($customTypes); $adapter = $this->getMockBuilder('ZF\\MvcAuth\\Authentication\\AdapterInterface')->disableOriginalConstructor()->getMock(); $adapter->expects($this->atLeastOnce())->method('provides')->will($this->returnValue($types)); $this->listener->attach($adapter); // Order of merge matters, unfortunately $this->assertEquals(array_merge($customTypes, $types), $this->listener->getAuthenticationTypes()); }
/** * Create a collection of adapters. * * @return ViewModel */ private function createAdapterCollection() { $adapters = $this->authListener->getAuthenticationTypes(); return $this->createViewModel($adapters); }