public function testSetParameter() { $conf = new PropelConfiguration(array()); $conf->setParameter('foo.fooo', 'bar'); $conf->setParameter('foo.fi.fooooo', 'bara'); $conf->setParameter('baz', 'bar2'); $this->assertEquals($this->testArray, $conf->getParameters(), 'setParameter accepts a flat array'); }
protected function getPropelConfiguration() { $config = new PropelConfiguration(array()); $config->setParameter('debugpdo.logging.outerglue', 'xx'); $config->setParameter('debugpdo.logging.innerglue', '/ '); $config->setParameter('debugpdo.logging.details.slow.enabled', true); $config->setParameter('debugpdo.logging.details.slow.threshold', 5); return $config; }
public function testSetParameterMultiNamespacedKeyArrayValue() { $c = new PropelConfiguration(); $c->setParameter('a.b.c', array('bar1' => 'baz1')); $this->assertEquals(array('bar1' => 'baz1'), $c['a']['b']['c']); $this->assertNull($c->getParameter('a.b.c')); $this->assertEquals('baz1', $c->getParameter('a.b.c.bar1')); }