ComposerInstallersTestDokuWikiInstallerTest

The WooCommerce Multilingual Composer Installers Test DokuWikiInstallerTest class.

Defined (1)

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

/vendor/composer/installers/tests/Composer/Installers/Test/DokuWikiInstallerTest.php  
  1. class DokuWikiInstallerTest extends \PHPUnit_Framework_TestCase 
  2. /** 
  3. * @var DokuWikiInstaller 
  4. */ 
  5. private $installer; 
  6.  
  7. public function setUp() 
  8. $this->installer = new DokuWikiInstaller( 
  9. new Package('NyanCat', '4.2', '4.2'),  
  10. new Composer() 
  11. ); 
  12.  
  13. /** 
  14. * @dataProvider packageNameInflectionProvider 
  15. */ 
  16. public function testInflectPackageVars($type, $name, $expected) 
  17. $this->assertEquals( 
  18. $this->installer->inflectPackageVars(array('name' => $name, 'type'=>$type)),  
  19. array('name' => $expected, 'type'=>$type) 
  20. ); 
  21.  
  22. public function packageNameInflectionProvider() 
  23. return array( 
  24. array( 
  25. 'dokuwiki-plugin',  
  26. 'dokuwiki-test-plugin',  
  27. 'test',  
  28. ),  
  29. array( 
  30. 'dokuwiki-plugin',  
  31. 'test-plugin',  
  32. 'test',  
  33. ),  
  34. array( 
  35. 'dokuwiki-plugin',  
  36. 'dokuwiki_test',  
  37. 'test',  
  38. ),  
  39. array( 
  40. 'dokuwiki-plugin',  
  41. 'test',  
  42. 'test',  
  43. ),  
  44. array( 
  45. 'dokuwiki-plugin',  
  46. 'test-template',  
  47. 'test-template',  
  48. ),  
  49. array( 
  50. 'dokuwiki-template',  
  51. 'dokuwiki-test-template',  
  52. 'test',  
  53. ),  
  54. array( 
  55. 'dokuwiki-template',  
  56. 'test-template',  
  57. 'test',  
  58. ),  
  59. array( 
  60. 'dokuwiki-template',  
  61. 'dokuwiki_test',  
  62. 'test',  
  63. ),  
  64. array( 
  65. 'dokuwiki-template',  
  66. 'test',  
  67. 'test',  
  68. ),  
  69. array( 
  70. 'dokuwiki-template',  
  71. 'test-plugin',  
  72. 'test-plugin',  
  73. ),  
  74. );