Ejemplo n.º 1
0
 public function testCanConfigureWithArrayInConstructor()
 {
     $options = new ListenerOptions(array('cache_dir' => __DIR__, 'config_cache_enabled' => true, 'config_cache_key' => 'foo', 'application_environment' => 'development'));
     $this->assertSame($options->getCacheDir(), __DIR__);
     $this->assertTrue($options->getConfigCacheEnabled());
     $this->assertNotNull(strstr($options->getConfigCacheFile(), __DIR__));
     $this->assertNotNull(strstr($options->getConfigCacheFile(), '.php'));
     $this->assertSame($options->getConfigCacheKey(), 'foo');
     $this->assertSame($options->getApplicationEnvironment(), 'development');
 }
Ejemplo n.º 2
0
 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());
 }