Пример #1
0
 /**
  * Returns a parameter by key with suffix.
  *
  * {@inheritDoc}
  */
 public function offsetGet($key)
 {
     $devKey = $key . static::DEV_PARAMETER_SUFFIX;
     $key = $this->offsetExists($devKey) ? $devKey : $key;
     return parent::offsetGet($key);
 }
Пример #2
0
 public function testOffsetSet()
 {
     $this->assertEquals(5, $this->object->offsetGet('test')->value);
     $this->object->offsetSet('test.number', 10);
     $this->assertEquals(10, $this->object->offsetGet('test')->value);
 }
Пример #3
0
 public function testOffsetGet()
 {
     $this->assertNull($this->container->offsetGet('foo'));
     $this->container['foo'] = TRUE;
     $this->assertTrue($this->container->offsetGet('foo'));
 }