Mercurial > hg > isophonics-drupal-site
comparison vendor/composer/installers/tests/Composer/Installers/Test/OntoWikiInstallerTest.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children | 7a779792577d |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 namespace Composer\Installers\Test; | |
3 | |
4 use Composer\Installers\OntoWikiInstaller; | |
5 use Composer\Package\Package; | |
6 use Composer\Composer; | |
7 | |
8 /** | |
9 * Test for the OntoWikiInstaller | |
10 * code was taken from DokuWikiInstaller | |
11 */ | |
12 class OntoWikiInstallerTest extends \PHPUnit_Framework_TestCase | |
13 { | |
14 /** | |
15 * @var OntoWikiInstaller | |
16 */ | |
17 private $installer; | |
18 | |
19 public function setUp() | |
20 { | |
21 $this->installer = new OntoWikiInstaller(); | |
22 } | |
23 | |
24 /** | |
25 * @dataProvider packageNameInflectionProvider | |
26 */ | |
27 public function testInflectPackageVars($type, $name, $expected) | |
28 { | |
29 $this->assertEquals( | |
30 $this->installer->inflectPackageVars(array('name' => $name, 'type'=>$type)), | |
31 array('name' => $expected, 'type'=>$type) | |
32 ); | |
33 } | |
34 | |
35 public function packageNameInflectionProvider() | |
36 { | |
37 return array( | |
38 array( | |
39 'ontowiki-extension', | |
40 'CSVImport.ontowiki', | |
41 'csvimport', | |
42 ), | |
43 array( | |
44 'ontowiki-extension', | |
45 'csvimport', | |
46 'csvimport', | |
47 ), | |
48 array( | |
49 'ontowiki-extension', | |
50 'some_ontowiki_extension', | |
51 'some_ontowiki_extension', | |
52 ), | |
53 array( | |
54 'ontowiki-extension', | |
55 'some_ontowiki_extension.ontowiki', | |
56 'some_ontowiki_extension', | |
57 ), | |
58 array( | |
59 'ontowiki-translation', | |
60 'de-translation.ontowiki', | |
61 'de', | |
62 ), | |
63 array( | |
64 'ontowiki-translation', | |
65 'en-US-translation.ontowiki', | |
66 'en-us', | |
67 ), | |
68 array( | |
69 'ontowiki-translation', | |
70 'en-US-translation', | |
71 'en-us', | |
72 ), | |
73 array( | |
74 'ontowiki-theme', | |
75 'blue-theme.ontowiki', | |
76 'blue', | |
77 ), | |
78 array( | |
79 'ontowiki-theme', | |
80 'blue-theme', | |
81 'blue', | |
82 ), | |
83 ); | |
84 } | |
85 } |