예제 #1
0
 /**
  *
  */
 public function testDelete()
 {
     $arr = ['foo' => '123', 'bar' => ['baz' => '456', 'bax' => ['789']]];
     $this->assertTrue(Arr::delete($arr, 'foo'));
     $this->assertTrue(Arr::delete($arr, 'bar.baz'));
     $this->assertTrue(Arr::delete($arr, 'bar.bax.0'));
     $this->assertFalse(Arr::delete($arr, 'nope.nope'));
     $this->assertEquals(['bar' => ['bax' => []]], $arr);
 }
예제 #2
0
 /**
  * Removes a value from the configuration.
  *
  * @access  public
  * @param   string   $key  Config key
  * @return  boolean
  */
 public function remove($key)
 {
     return Arr::delete($this->configuration, $key);
 }