function let(LdapConnectionInterface $connection, EventDispatcherInterface $dispatcher, LdapLoggerInterface $logger) { $connection->getConfig()->willReturn(new DomainConfiguration('example.local')); $connection->getConnection()->willReturn(null); $connection->isBound()->willReturn(true); $connection->getServer()->willReturn('foo'); $connection->getIdleTime()->willReturn(1); $this->setConnection($connection); $this->setEventDispatcher($dispatcher); $this->setLogger($logger); }
/** * @param LdapOperationInterface $operation */ public function setOperationDefaults(LdapOperationInterface $operation) { if (is_null($operation->getServer())) { $operation->setServer($this->connection->getServer()); } }