PiwikInstallerTest.php in Zircon Profile 8
File
vendor/composer/installers/tests/Composer/Installers/Test/PiwikInstallerTest.php
View source
<?php
namespace Composer\Installers\Test;
use Composer\Composer;
use Composer\Installers\PiwikInstaller;
use Composer\Package\Package;
use Composer\Package\PackageInterface;
class PiwikInstallerTest extends TestCase {
private $composer;
private $io;
private $package;
public function setUp() {
$this->package = new Package('VisitSummary', '1.0', '1.0');
$this->io = $this
->getMock('Composer\\IO\\PackageInterface');
$this->composer = new Composer();
}
public function testInflectPackageVars() {
$installer = new PiwikInstaller($this->package, $this->composer);
$result = $installer
->inflectPackageVars(array(
'name' => 'VisitSummary',
));
$this
->assertEquals($result, array(
'name' => 'VisitSummary',
));
$installer = new PiwikInstaller($this->package, $this->composer);
$result = $installer
->inflectPackageVars(array(
'name' => 'visit-summary',
));
$this
->assertEquals($result, array(
'name' => 'VisitSummary',
));
$installer = new PiwikInstaller($this->package, $this->composer);
$result = $installer
->inflectPackageVars(array(
'name' => 'visit_summary',
));
$this
->assertEquals($result, array(
'name' => 'VisitSummary',
));
}
}