You are here

PimcoreInstallerTest.php in Zircon Profile 8

File

vendor/composer/installers/tests/Composer/Installers/Test/PimcoreInstallerTest.php
View source
<?php

namespace Composer\Installers\Test;

use Composer\Installers\PimcoreInstaller;
use Composer\Package\Package;
use Composer\Composer;
class PimcoreInstallerTest extends TestCase {
  private $composer;
  private $io;

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

  /**
   * testInflectPackageVars
   *
   * @return void
   */
  public function testInflectPackageVars() {
    $installer = new PimcoreInstaller($this->package, $this->composer);
    $result = $installer
      ->inflectPackageVars(array(
      'name' => 'CamelCased',
    ));
    $this
      ->assertEquals($result, array(
      'name' => 'CamelCased',
    ));
    $installer = new PimcoreInstaller($this->package, $this->composer);
    $result = $installer
      ->inflectPackageVars(array(
      'name' => 'with-dash',
    ));
    $this
      ->assertEquals($result, array(
      'name' => 'WithDash',
    ));
    $installer = new PimcoreInstaller($this->package, $this->composer);
    $result = $installer
      ->inflectPackageVars(array(
      'name' => 'with_underscore',
    ));
    $this
      ->assertEquals($result, array(
      'name' => 'WithUnderscore',
    ));
  }

}

Classes