public function testSettersGetters() { $config = new Config(); $config->setBootstrap('test'); $this->assertEquals('test', $config->getBootstrap()); $config->setWorkerLifetime(6000); $this->assertEquals(6000, $config->getWorkerLifetime()); $config->setAutoUpdate(true); $this->assertEquals(true, $config->getAutoUpdate()); }
/** * @param Config $config * @param StreamSelectLoop|LibEventLoop $loop * @param Process $process * @param LoggerInterface|null $logger */ public function __construct(Config $config = null, Process $process = null, $loop = null, LoggerInterface $logger = null) { static::$instance = $this; if (null === $config) { $config = Config::getInstance(); } $this->setConfig($config); if (null !== $logger) { $this->setLogger($logger); } if (null !== $process) { $this->setProcess($process); } if ($loop instanceof StreamSelectLoop || $loop instanceof LibEventLoop) { $this->setLoop($loop); } }