Bart\Configuration\TestConfig::nicknames PHP Method

nicknames() public method

public nicknames ( )
    public function nicknames()
    {
        // Throw in a default here to confirm that it is ignored when a value is configured
        return $this->getArray('favorites', 'nicknames', ['ignored']);
    }

Usage Example

Example #1
0
 public function testGetArrayIgnoresSpacesNotProcededByCommas()
 {
     $configs = new TestConfig();
     $configs->configureForTesting(array('favorites' => array('nicknames' => 'bubba, hingle mccringle')));
     $nicknames = $configs->nicknames();
     $this->assertEquals(array('bubba', 'hingle mccringle'), $nicknames);
 }