ComposerInstallersTestPimcoreInstallerTest

The WooCommerce Multilingual Composer Installers Test PimcoreInstallerTest class.

Defined (1)

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

/vendor/composer/installers/tests/Composer/Installers/Test/PimcoreInstallerTest.php  
  1. class PimcoreInstallerTest extends TestCase 
  2. private $composer; 
  3. private $io; 
  4.  
  5. /** 
  6. * setUp 
  7. * @return void 
  8. */ 
  9. public function setUp() 
  10. $this->package = new Package('CamelCased', '1.0', '1.0'); 
  11. $this->io = $this->getMock('Composer\IO\PackageInterface'); 
  12. $this->composer = new Composer(); 
  13.  
  14. /** 
  15. * testInflectPackageVars 
  16. * @return void 
  17. */ 
  18. public function testInflectPackageVars() 
  19. $installer = new PimcoreInstaller($this->package, $this->composer); 
  20. $result = $installer->inflectPackageVars(array('name' => 'CamelCased')); 
  21. $this->assertEquals($result, array('name' => 'CamelCased')); 
  22.  
  23. $installer = new PimcoreInstaller($this->package, $this->composer); 
  24. $result = $installer->inflectPackageVars(array('name' => 'with-dash')); 
  25. $this->assertEquals($result, array('name' => 'WithDash')); 
  26.  
  27. $installer = new PimcoreInstaller($this->package, $this->composer); 
  28. $result = $installer->inflectPackageVars(array('name' => 'with_underscore')); 
  29. $this->assertEquals($result, array('name' => 'WithUnderscore'));