Exemplo n.º 1
0
 /**
  * @param $composerDir string Directory under _files that contains composer files
  *
  * @dataProvider getRequiredPhpVersionDataProvider
  */
 public function testGetRootRequiredPackagesAndTypes($composerDir)
 {
     $this->setupDirectoryMock($composerDir);
     $composerInfo = new ComposerInformation($this->filesystemMock, $this->bufferIoFactoryMock);
     $requiredPackagesAndTypes = $composerInfo->getRootRequiredPackageTypesByName();
     $this->assertArrayHasKey('composer/composer', $requiredPackagesAndTypes);
     $this->assertEquals('library', $requiredPackagesAndTypes['composer/composer']);
 }
Exemplo n.º 2
0
 /**
  * @param $composerDir string Directory under _files that contains composer files
  *
  * @dataProvider getRequiredPhpVersionDataProvider
  */
 public function testGetRequiredExtensions($composerDir)
 {
     $this->setupDirectoryMock($composerDir);
     $composerInfo = new ComposerInformation($this->filesystemMock, $this->ioMock);
     $expectedExtensions = ['ctype', 'gd', 'spl', 'dom', 'simplexml', 'mcrypt', 'hash', 'curl', 'iconv', 'intl'];
     $actualRequiredExtensions = $composerInfo->getRequiredExtensions();
     foreach ($expectedExtensions as $expectedExtension) {
         $this->assertContains($expectedExtension, $actualRequiredExtensions);
     }
 }