/**
  * @expectedException PHPUnit_Framework_Error_Deprecated
  */
 public function testScanRoleDocCorrectDirectory()
 {
     $pps = new PearPackageScanner();
     $pps->setChannel('pear.phpunit.de');
     $pps->setPackage('phpunit');
     $pps->setRole('doc');
     $pps->scan();
     $arFiles = $pps->getIncludedFiles();
     $basedir = $pps->getBaseDir();
     $this->assertContains('LICENSE', $arFiles);
     foreach ($arFiles as $file) {
         $fullpath = $basedir . $file;
         $this->assertTrue(file_exists($fullpath), 'File does not exist: ' . $file . ' at ' . $fullpath);
     }
 }
 public function testScanRoleDocPackageXml()
 {
     $pps = new PearPackageScanner();
     $pps->setDescFile(PHING_TEST_BASE . '/etc/types/package_PHPUnit-3.7.10.xml');
     $pps->setRole('doc');
     $pps->scan();
     $arFiles = $pps->getIncludedFiles();
     $this->assertEquals($arFiles, array('ChangeLog.md', 'CONTRIBUTING.md', 'LICENSE', 'README.md'));
 }
 /**
  * baseinstalldir attribute needs to be taken into account.
  */
 public function testScanBaseInstallDir()
 {
     $pps = new PearPackageScanner();
     $pps->setDescFile(PHING_TEST_BASE . '/etc/types/package_Console_Table-1.2.0.xml');
     $pps->setRole('php');
     $pps->scan();
     $arFiles = $pps->getIncludedFiles();
     $this->assertEquals($arFiles, array('Console/Table.php'));
 }