public function testCreate() { $installer = new TestInstaller(); $descriptor = new InstallerDescriptor('test', get_class($installer), null, array(new InstallerParameter('param1', InstallerParameter::OPTIONAL, 'default1'), new InstallerParameter('param2', InstallerParameter::OPTIONAL, 'default2'))); $resources = new ArrayResourceCollection(); $mapping = new AssetMapping('/path/to/{css,js}', 'localhost', '/demo'); $server = new Server('localhost', 'symlink', 'public_html', '/%s', array('param2' => 'custom')); $params = new InstallationParams($installer, $descriptor, $resources, $mapping, $server, '/root'); $this->assertSame($installer, $params->getInstaller()); $this->assertSame($descriptor, $params->getInstallerDescriptor()); $this->assertSame($resources, $params->getResources()); $this->assertSame('/root', $params->getRootDirectory()); $this->assertSame('/path/to', $params->getBasePath()); $this->assertSame('public_html', $params->getDocumentRoot()); $this->assertSame('/demo', $params->getServerPath()); $this->assertSame(array('param1' => 'default1', 'param2' => 'custom'), $params->getParameterValues()); }