View source
<?php
namespace Composer\Installers\Test;
use Composer\Installers\AsgardInstaller;
use Composer\Package\Package;
use Composer\Composer;
class AsgardInstallerTest extends \PHPUnit_Framework_TestCase {
private $installer;
public function setUp() {
$this->installer = new AsgardInstaller(new Package('NyanCat', '4.2', '4.2'), new Composer());
}
public function testInflectPackageVars($type, $name, $expected) {
$this
->assertEquals($this->installer
->inflectPackageVars(array(
'name' => $name,
'type' => $type,
)), array(
'name' => $expected,
'type' => $type,
));
}
public function packageNameInflectionProvider() {
return array(
array(
'asgard-module',
'asgard-module',
'Asgard',
),
array(
'asgard-module',
'blog',
'Blog',
),
array(
'asgard-theme',
'some-theme-theme',
'Some-theme',
),
array(
'asgard-theme',
'someothertheme',
'Someothertheme',
),
);
}
}