public function testCanUseAuthenticationExtensionsViaPluginBroker() { $options = new SmtpOptions(array('connection_class' => 'login')); $transport = new Smtp($options); $connection = $transport->plugin($options->getConnectionClass(), array(array('username' => 'matthew', 'password' => 'password', 'host' => 'localhost'))); $this->assertInstanceOf('Zend\\Mail\\Protocol\\Smtp\\Auth\\Login', $connection); $this->assertEquals('matthew', $connection->getUsername()); $this->assertEquals('password', $connection->getPassword()); }