ComposerInstallersTestYawikInstallerTest

Class YawikInstallerTest.

Defined (1)

The class is defined in the following location(s).

/vendor/composer/installers/tests/Composer/Installers/Test/YawikInstallerTest.php  
  1. class YawikInstallerTest extends TestCase 
  2. /** 
  3. * @varComposer 
  4. */ 
  5. private $composer; 
  6.  
  7. /** 
  8. * @var PackageInterface 
  9. */ 
  10. private $io; 
  11.  
  12. /** 
  13. * @var Package 
  14. */ 
  15. private $package; 
  16.  
  17. /** 
  18. * setUp 
  19. * @return void 
  20. */ 
  21. public function setUp() 
  22. $this->package = new Package('YawikCompanyRegistration', '1.0', '1.0'); 
  23. $this->io = $this->getMock('Composer\IO\PackageInterface'); 
  24. $this->composer = new Composer(); 
  25.  
  26. /** 
  27. * testInflectPackageVars 
  28. * @dataProvider packageNameProvider 
  29. * @return void 
  30. */ 
  31. public function testInflectPackageVars($input) 
  32. $installer = new YawikInstaller($this->package, $this->composer); 
  33. $result = $installer->inflectPackageVars(array('name' => $input)); 
  34. $this->assertEquals($result, array('name' => 'YawikCompanyRegistration')); 
  35.  
  36. public function packageNameProvider() 
  37. return array( 
  38. array('yawik-company-registration'),  
  39. array('yawik_company_registration'),  
  40. array('YawikCompanyRegistration') 
  41. );