-
-
Notifications
You must be signed in to change notification settings - Fork 413
/
MatomoInstallerTest.php
47 lines (39 loc) · 1.36 KB
/
MatomoInstallerTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
namespace Composer\Installers\Test;
use Composer\Composer;
use Composer\Installers\MatomoInstaller;
use Composer\Package\Package;
use Composer\Package\PackageInterface;
/**
* Class MatomoInstallerTest
*
* @package Composer\Installers\Test
*/
class MatomoInstallerTest extends TestCase
{
/**
* @var Composer
*/
private $composer;
/**
* @var Package
*/
private $package;
public function setUp(): void
{
$this->package = new Package('VisitSummary', '1.0', '1.0');
$this->composer = new Composer();
}
public function testInflectPackageVars(): void
{
$installer = new MatomoInstaller($this->package, $this->composer, $this->getMockIO());
$result = $installer->inflectPackageVars(array('name' => 'VisitSummary'));
$this->assertEquals($result, array('name' => 'VisitSummary'));
$installer = new MatomoInstaller($this->package, $this->composer, $this->getMockIO());
$result = $installer->inflectPackageVars(array('name' => 'visit-summary'));
$this->assertEquals($result, array('name' => 'VisitSummary'));
$installer = new MatomoInstaller($this->package, $this->composer, $this->getMockIO());
$result = $installer->inflectPackageVars(array('name' => 'visit_summary'));
$this->assertEquals($result, array('name' => 'VisitSummary'));
}
}