ComposerInstallersTestPiwikInstallerTest

Class PiwikInstallerTest.

Defined (1)

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

/vendor/composer/installers/tests/Composer/Installers/Test/PiwikInstallerTest.php  
  1. class PiwikInstallerTest 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('VisitSummary', '1.0', '1.0'); 
  23. $this->io = $this->getMock('Composer\IO\PackageInterface'); 
  24. $this->composer = new Composer(); 
  25.  
  26. /** 
  27. * testInflectPackageVars 
  28. * @return void 
  29. */ 
  30. public function testInflectPackageVars() 
  31. $installer = new PiwikInstaller($this->package, $this->composer); 
  32. $result = $installer->inflectPackageVars(array('name' => 'VisitSummary')); 
  33. $this->assertEquals($result, array('name' => 'VisitSummary')); 
  34.  
  35. $installer = new PiwikInstaller($this->package, $this->composer); 
  36. $result = $installer->inflectPackageVars(array('name' => 'visit-summary')); 
  37. $this->assertEquals($result, array('name' => 'VisitSummary')); 
  38.  
  39. $installer = new PiwikInstaller($this->package, $this->composer); 
  40. $result = $installer->inflectPackageVars(array('name' => 'visit_summary')); 
  41. $this->assertEquals($result, array('name' => 'VisitSummary')); 
  42.