AsseticBundle\Configuration::setDefault PHP Method

setDefault() public method

public setDefault ( array $default )
$default array
    public function setDefault(array $default)
    {
        if (!isset($default['assets'])) {
            $default['assets'] = [];
        }
        if (!isset($default['options'])) {
            $default['options'] = [];
        }
        $this->default = $default;
    }

Usage Example

コード例 #1
0
 public function testSetDefault()
 {
     $options = array('test' => array());
     $expected = array('test' => array(), 'assets' => array(), 'options' => array());
     $result = $this->object->setDefault($options);
     $this->assertNull($result);
     $this->assertEquals($expected, $this->object->getDefault());
 }