More updates to stop using dev or alpha or beta versions.
[yaffs-website] / vendor / composer / installers / tests / Composer / Installers / Test / YawikInstallerTest.php
1 <?php
2 namespace Composer\Installers\Test;
3
4 use Composer\Composer;
5 use Composer\Installers\YawikInstaller;
6 use Composer\Package\Package;
7 use Composer\Package\PackageInterface;
8
9 /**
10  * Class YawikInstallerTest
11  *
12  * @package Composer\Installers\Test
13  */
14 class YawikInstallerTest extends TestCase
15 {
16     /**
17      * @varComposer
18      */
19     private $composer;
20
21     /**
22      * @var PackageInterface
23      */
24     private $io;
25
26     /**
27      * @var Package
28      */
29     private $package;
30
31     /**
32      * setUp
33      *
34      * @return void
35      */
36     public function setUp()
37     {
38         $this->package = new Package('YawikCompanyRegistration', '1.0', '1.0');
39         $this->io = $this->getMock('Composer\IO\PackageInterface');
40         $this->composer = new Composer();
41     }
42
43     /**
44      * testInflectPackageVars
45      *
46      * @dataProvider packageNameProvider
47      * @return void
48      */
49     public function testInflectPackageVars($input)
50     {
51         $installer = new YawikInstaller($this->package, $this->composer);
52         $result = $installer->inflectPackageVars(array('name' => $input));
53         $this->assertEquals($result, array('name' => 'YawikCompanyRegistration'));
54     }
55
56     public function packageNameProvider()
57     {
58         return array(
59             array('yawik-company-registration'),
60             array('yawik_company_registration'),
61             array('YawikCompanyRegistration')
62         );
63     }
64 }