public function testGetDataExcludesAvailableDataWhenFlagged()
 {
     $this->extension->setCustomData($this->customData)->setReturnAvailableData(false);
     $this->extension->expects($this->at(0))->method('yamlParse')->with('data.yml')->will($this->returnValue($this->currentData));
     $expectedResult = ['version' => '54', 'composer' => '0', 'modules' => ['php' => [], 'pear' => [], 'pecl' => []], 'ini' => ['display_errors' => 'Off'], 'timezone' => 'America/Chihuahua'];
     $this->assertEquals($expectedResult, $this->extension->getData());
 }
 public function testGetSourcesReturnsAssociativeArray()
 {
     $expected = ['stdlib' => ":git => 'https://github.com/puphpet/puppetlabs-stdlib.git'"];
     $result = $this->extension->getSources();
     $this->assertArrayHasKey('stdlib', $result);
     $this->assertEquals($expected['stdlib'], $result['stdlib']);
 }
Example #3
0
 /**
  * @param Container $container
  */
 public function __construct(Container $container)
 {
     $this->dataLocation = __DIR__ . '/Resources/config';
     parent::__construct($container);
 }