commit
6f33d4e17f
|
@ -4,7 +4,8 @@ namespace {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class CFoo {
|
class CFoo
|
||||||
|
{
|
||||||
use TFoo;
|
use TFoo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +23,8 @@ namespace Foo {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class CBar implements IBar {
|
class CBar implements IBar
|
||||||
|
{
|
||||||
use TBar, TFooBar;
|
use TBar, TFooBar;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,6 @@ namespace Composer\Test\DependencyResolver;
|
||||||
use Composer\DependencyResolver\Request;
|
use Composer\DependencyResolver\Request;
|
||||||
use Composer\DependencyResolver\Pool;
|
use Composer\DependencyResolver\Pool;
|
||||||
use Composer\Repository\ArrayRepository;
|
use Composer\Repository\ArrayRepository;
|
||||||
use Composer\DependencyResolver\Literal;
|
|
||||||
use Composer\Test\TestCase;
|
use Composer\Test\TestCase;
|
||||||
|
|
||||||
class RequestTest extends TestCase
|
class RequestTest extends TestCase
|
||||||
|
|
|
@ -12,15 +12,12 @@
|
||||||
namespace Composer\Test\DependencyResolver;
|
namespace Composer\Test\DependencyResolver;
|
||||||
|
|
||||||
use Composer\Repository\ArrayRepository;
|
use Composer\Repository\ArrayRepository;
|
||||||
use Composer\Repository\PlatformRepository;
|
|
||||||
use Composer\Repository\ComposerRepository;
|
|
||||||
use Composer\DependencyResolver\DefaultPolicy;
|
use Composer\DependencyResolver\DefaultPolicy;
|
||||||
use Composer\DependencyResolver\Pool;
|
use Composer\DependencyResolver\Pool;
|
||||||
use Composer\DependencyResolver\Request;
|
use Composer\DependencyResolver\Request;
|
||||||
use Composer\DependencyResolver\Solver;
|
use Composer\DependencyResolver\Solver;
|
||||||
use Composer\DependencyResolver\SolverProblemsException;
|
use Composer\DependencyResolver\SolverProblemsException;
|
||||||
use Composer\Package\Link;
|
use Composer\Package\Link;
|
||||||
use Composer\Package\LinkConstraint\VersionConstraint;
|
|
||||||
use Composer\Test\TestCase;
|
use Composer\Test\TestCase;
|
||||||
|
|
||||||
class SolverTest extends TestCase
|
class SolverTest extends TestCase
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
|
|
||||||
namespace Composer\Test\Downloader;
|
namespace Composer\Test\Downloader;
|
||||||
|
|
||||||
use Composer\Util\Filesystem;
|
|
||||||
|
|
||||||
class ArchiveDownloaderTest extends \PHPUnit_Framework_TestCase
|
class ArchiveDownloaderTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
public function testGetFileName()
|
public function testGetFileName()
|
||||||
|
|
|
@ -21,6 +21,7 @@ class FileDownloaderTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
$io = $io ?: $this->getMock('Composer\IO\IOInterface');
|
$io = $io ?: $this->getMock('Composer\IO\IOInterface');
|
||||||
$rfs = $rfs ?: $this->getMockBuilder('Composer\Util\RemoteFilesystem')->disableOriginalConstructor()->getMock();
|
$rfs = $rfs ?: $this->getMockBuilder('Composer\Util\RemoteFilesystem')->disableOriginalConstructor()->getMock();
|
||||||
|
|
||||||
return new FileDownloader($io, $rfs);
|
return new FileDownloader($io, $rfs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,6 +97,7 @@ class FileDownloaderTest extends \PHPUnit_Framework_TestCase
|
||||||
if (is_file($path.'/script.js')) {
|
if (is_file($path.'/script.js')) {
|
||||||
unlink($path.'/script.js');
|
unlink($path.'/script.js');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $messages;
|
return $messages;
|
||||||
}))
|
}))
|
||||||
;
|
;
|
||||||
|
@ -108,7 +110,7 @@ class FileDownloaderTest extends \PHPUnit_Framework_TestCase
|
||||||
if (is_dir($path)) {
|
if (is_dir($path)) {
|
||||||
$fs = new Filesystem();
|
$fs = new Filesystem();
|
||||||
$fs->removeDirectory($path);
|
$fs->removeDirectory($path);
|
||||||
} else if (is_file($path)) {
|
} elseif (is_file($path)) {
|
||||||
unset($path);
|
unset($path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,7 +148,7 @@ class FileDownloaderTest extends \PHPUnit_Framework_TestCase
|
||||||
if (is_dir($path)) {
|
if (is_dir($path)) {
|
||||||
$fs = new Filesystem();
|
$fs = new Filesystem();
|
||||||
$fs->removeDirectory($path);
|
$fs->removeDirectory($path);
|
||||||
} else if (is_file($path)) {
|
} elseif (is_file($path)) {
|
||||||
unset($path);
|
unset($path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
|
|
||||||
namespace Composer\Test\Downloader;
|
namespace Composer\Test\Downloader;
|
||||||
|
|
||||||
use Composer\Util\Filesystem;
|
|
||||||
use Composer\Downloader\ZipDownloader;
|
use Composer\Downloader\ZipDownloader;
|
||||||
|
|
||||||
class ZipDownloaderTest extends \PHPUnit_Framework_TestCase
|
class ZipDownloaderTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
|
@ -33,6 +33,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
$f = function() {
|
$f = function() {
|
||||||
$repositories = func_get_args();
|
$repositories = func_get_args();
|
||||||
|
|
||||||
return array('repositories' => $repositories);
|
return array('repositories' => $repositories);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -147,6 +147,7 @@ class InstallerInstallerMock extends InstallerInstaller
|
||||||
public function getInstallPath(PackageInterface $package)
|
public function getInstallPath(PackageInterface $package)
|
||||||
{
|
{
|
||||||
$version = $package->getVersion();
|
$version = $package->getVersion();
|
||||||
|
|
||||||
return __DIR__.'/Fixtures/installer-v'.$version[0].'/';
|
return __DIR__.'/Fixtures/installer-v'.$version[0].'/';
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -13,7 +13,6 @@
|
||||||
namespace Composer\Test\Installer;
|
namespace Composer\Test\Installer;
|
||||||
|
|
||||||
use Composer\Installer\LibraryInstaller;
|
use Composer\Installer\LibraryInstaller;
|
||||||
use Composer\DependencyResolver\Operation;
|
|
||||||
use Composer\Util\Filesystem;
|
use Composer\Util\Filesystem;
|
||||||
use Composer\Test\TestCase;
|
use Composer\Test\TestCase;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ use Composer\Config;
|
||||||
use Composer\Json\JsonFile;
|
use Composer\Json\JsonFile;
|
||||||
use Composer\Repository\ArrayRepository;
|
use Composer\Repository\ArrayRepository;
|
||||||
use Composer\Repository\RepositoryManager;
|
use Composer\Repository\RepositoryManager;
|
||||||
use Composer\Repository\RepositoryInterface;
|
|
||||||
use Composer\Package\PackageInterface;
|
use Composer\Package\PackageInterface;
|
||||||
use Composer\Package\Link;
|
use Composer\Package\Link;
|
||||||
use Composer\Package\Locker;
|
use Composer\Package\Locker;
|
||||||
|
|
|
@ -13,7 +13,6 @@ namespace Composer\Test\Mock;
|
||||||
|
|
||||||
use Composer\Installer\InstallationManager;
|
use Composer\Installer\InstallationManager;
|
||||||
use Composer\Repository\RepositoryInterface;
|
use Composer\Repository\RepositoryInterface;
|
||||||
use Composer\DependencyResolver\Operation\OperationInterface;
|
|
||||||
use Composer\DependencyResolver\Operation\InstallOperation;
|
use Composer\DependencyResolver\Operation\InstallOperation;
|
||||||
use Composer\DependencyResolver\Operation\UpdateOperation;
|
use Composer\DependencyResolver\Operation\UpdateOperation;
|
||||||
use Composer\DependencyResolver\Operation\UninstallOperation;
|
use Composer\DependencyResolver\Operation\UninstallOperation;
|
||||||
|
|
|
@ -16,7 +16,7 @@ use Composer\Package\LinkConstraint\VersionConstraint;
|
||||||
|
|
||||||
class VersionConstraintTest extends \PHPUnit_Framework_TestCase
|
class VersionConstraintTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
static public function successfulVersionMatches()
|
public static function successfulVersionMatches()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
// require provide
|
// require provide
|
||||||
|
@ -41,7 +41,7 @@ class VersionConstraintTest extends \PHPUnit_Framework_TestCase
|
||||||
$this->assertTrue($versionRequire->matches($versionProvide));
|
$this->assertTrue($versionRequire->matches($versionProvide));
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function failingVersionMatches()
|
public static function failingVersionMatches()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
// require provide
|
// require provide
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
|
|
||||||
namespace Composer\Repository;
|
namespace Composer\Repository;
|
||||||
|
|
||||||
use Composer\Repository\FilesystemRepository;
|
|
||||||
use Composer\Test\TestCase;
|
use Composer\Test\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
namespace Composer\Test\Repository\Vcs;
|
namespace Composer\Test\Repository\Vcs;
|
||||||
|
|
||||||
use Composer\Repository\Vcs\SvnDriver;
|
use Composer\Repository\Vcs\SvnDriver;
|
||||||
use Composer\IO\NullIO;
|
|
||||||
use Composer\Config;
|
use Composer\Config;
|
||||||
|
|
||||||
class SvnDriverTest extends \PHPUnit_Framework_TestCase
|
class SvnDriverTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
|
@ -15,7 +15,6 @@ namespace Composer\Test\Repository;
|
||||||
use Symfony\Component\Process\ExecutableFinder;
|
use Symfony\Component\Process\ExecutableFinder;
|
||||||
use Composer\Package\Dumper\ArrayDumper;
|
use Composer\Package\Dumper\ArrayDumper;
|
||||||
use Composer\Repository\VcsRepository;
|
use Composer\Repository\VcsRepository;
|
||||||
use Composer\Repository\Vcs\GitDriver;
|
|
||||||
use Composer\Util\Filesystem;
|
use Composer\Util\Filesystem;
|
||||||
use Composer\Util\ProcessExecutor;
|
use Composer\Util\ProcessExecutor;
|
||||||
use Composer\IO\NullIO;
|
use Composer\IO\NullIO;
|
||||||
|
@ -37,10 +36,12 @@ class VcsRepositoryTest extends \PHPUnit_Framework_TestCase
|
||||||
$locator = new ExecutableFinder();
|
$locator = new ExecutableFinder();
|
||||||
if (!$locator->find('git')) {
|
if (!$locator->find('git')) {
|
||||||
$this->skipped = 'This test needs a git binary in the PATH to be able to run';
|
$this->skipped = 'This test needs a git binary in the PATH to be able to run';
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!mkdir(self::$gitRepo) || !chdir(self::$gitRepo)) {
|
if (!mkdir(self::$gitRepo) || !chdir(self::$gitRepo)) {
|
||||||
$this->skipped = 'Could not create and move into the temp git repo '.self::$gitRepo;
|
$this->skipped = 'Could not create and move into the temp git repo '.self::$gitRepo;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase
|
||||||
protected function getAliasPackage($package, $version)
|
protected function getAliasPackage($package, $version)
|
||||||
{
|
{
|
||||||
$normVersion = self::getVersionParser()->normalize($version);
|
$normVersion = self::getVersionParser()->normalize($version);
|
||||||
|
|
||||||
return new AliasPackage($package, $normVersion, $version);
|
return new AliasPackage($package, $normVersion, $version);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
namespace Composer\Test\Util;
|
namespace Composer\Test\Util;
|
||||||
|
|
||||||
use Composer\Util\RemoteFilesystem;
|
use Composer\Util\RemoteFilesystem;
|
||||||
use Composer\Test\TestCase;
|
|
||||||
|
|
||||||
class RemoteFilesystemTest extends \PHPUnit_Framework_TestCase
|
class RemoteFilesystemTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue