You are here

public function CakePHPInstallerTest::testInflectPackageVars in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php \Composer\Installers\Test\CakePHPInstallerTest::testInflectPackageVars()

testInflectPackageVars

Return value

void

File

vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php, line 37

Class

CakePHPInstallerTest

Namespace

Composer\Installers\Test

Code

public function testInflectPackageVars() {
  $installer = new CakePHPInstaller($this->package, $this->composer);
  $result = $installer
    ->inflectPackageVars(array(
    'name' => 'CamelCased',
  ));
  $this
    ->assertEquals($result, array(
    'name' => 'CamelCased',
  ));
  $installer = new CakePHPInstaller($this->package, $this->composer);
  $result = $installer
    ->inflectPackageVars(array(
    'name' => 'with-dash',
  ));
  $this
    ->assertEquals($result, array(
    'name' => 'WithDash',
  ));
  $installer = new CakePHPInstaller($this->package, $this->composer);
  $result = $installer
    ->inflectPackageVars(array(
    'name' => 'with_underscore',
  ));
  $this
    ->assertEquals($result, array(
    'name' => 'WithUnderscore',
  ));
  $installer = new CakePHPInstaller($this->package, $this->composer);
  $result = $installer
    ->inflectPackageVars(array(
    'name' => 'cake/acl',
  ));
  $this
    ->assertEquals($result, array(
    'name' => 'Cake/Acl',
  ));
  $installer = new CakePHPInstaller($this->package, $this->composer);
  $result = $installer
    ->inflectPackageVars(array(
    'name' => 'cake/debug-kit',
  ));
  $this
    ->assertEquals($result, array(
    'name' => 'Cake/DebugKit',
  ));
}