public function testSetModulePathsAcceptsConfigOrTraverable() { $config = new Config(array(__DIR__)); $options = new ListenerOptions(); $options->setModulePaths($config); $this->assertSame($config, $options->getModulePaths()); }
public function testCanConfigureWithArrayInConstructor() { $options = new ListenerOptions(array('cache_dir' => __DIR__, 'config_cache_enabled' => true, 'config_cache_key' => 'foo', 'module_paths' => array('foo', 'bar'))); $this->assertSame($options->getCacheDir(), __DIR__); $this->assertTrue($options->getConfigCacheEnabled()); $this->assertNotNull(strstr($options->getConfigCacheFile(), __DIR__)); $this->assertNotNull(strstr($options->getConfigCacheFile(), '.php')); $this->assertSame('foo', $options->getConfigCacheKey()); $this->assertSame(array('foo', 'bar'), $options->getModulePaths()); }