You are here

class PiwikInstallerTest in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/composer/installers/tests/Composer/Installers/Test/PiwikInstallerTest.php \Composer\Installers\Test\PiwikInstallerTest

Class PiwikInstallerTest

@package Composer\Installers\Test

Hierarchy

  • class \Composer\Installers\Test\TestCase extends \Composer\Installers\Test\PHPUnit_Framework_TestCase

Expanded class hierarchy of PiwikInstallerTest

File

vendor/composer/installers/tests/Composer/Installers/Test/PiwikInstallerTest.php, line 14

Namespace

Composer\Installers\Test
View source
class PiwikInstallerTest extends TestCase {

  /**
   * @varComposer
   */
  private $composer;

  /**
   * @var PackageInterface
   */
  private $io;

  /**
   * @var Package
   */
  private $package;

  /**
   * setUp
   *
   * @return void
   */
  public function setUp() {
    $this->package = new Package('VisitSummary', '1.0', '1.0');
    $this->io = $this
      ->getMock('Composer\\IO\\PackageInterface');
    $this->composer = new Composer();
  }

  /**
   * testInflectPackageVars
   *
   * @return void
   */
  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',
    ));
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PiwikInstallerTest::$composer private property @varComposer
PiwikInstallerTest::$io private property
PiwikInstallerTest::$package private property
PiwikInstallerTest::setUp public function setUp
PiwikInstallerTest::testInflectPackageVars public function testInflectPackageVars
TestCase::$parser private static property
TestCase::ensureDirectoryExistsAndClear protected function
TestCase::getAliasPackage protected function
TestCase::getPackage protected function
TestCase::getVersionConstraint protected function
TestCase::getVersionParser protected static function