62 lines
1.8 KiB
PHP
62 lines
1.8 KiB
PHP
|
<?php
|
||
|
/*
|
||
|
* This file is part of Composer.
|
||
|
*
|
||
|
* (c) Nils Adermann <naderman@naderman.de>
|
||
|
* Jordi Boggiano <j.boggiano@seld.be>
|
||
|
*
|
||
|
* For the full copyright and license information, please view the LICENSE
|
||
|
* file that was distributed with this source code.
|
||
|
*/
|
||
|
|
||
|
namespace Composer\Test;
|
||
|
|
||
|
use Composer\Composer;
|
||
|
|
||
|
class ComposerTest extends TestCase
|
||
|
{
|
||
|
public function testSetGetPackage()
|
||
|
{
|
||
|
$composer = new Composer();
|
||
|
$package = $this->getMock('Composer\Package\PackageInterface');
|
||
|
$composer->setPackage($package);
|
||
|
|
||
|
$this->assertEquals($package,$composer->getPackage());
|
||
|
}
|
||
|
|
||
|
public function testSetGetLocker()
|
||
|
{
|
||
|
$composer = new Composer();
|
||
|
$locker = $this->getMockBuilder('Composer\Package\Locker')->disableOriginalConstructor()->getMock();
|
||
|
$composer->setLocker($locker);
|
||
|
|
||
|
$this->assertEquals($locker,$composer->getLocker());
|
||
|
}
|
||
|
|
||
|
public function testSetGetRepositoryManager()
|
||
|
{
|
||
|
$composer = new Composer();
|
||
|
$manager = $this->getMockBuilder('Composer\Repository\RepositoryManager')->disableOriginalConstructor()->getMock();
|
||
|
$composer->setRepositoryManager($manager);
|
||
|
|
||
|
$this->assertEquals($manager,$composer->getRepositoryManager());
|
||
|
}
|
||
|
|
||
|
public function testSetGetDownloadManager()
|
||
|
{
|
||
|
$composer = new Composer();
|
||
|
$manager = $this->getMock('Composer\Downloader\DownloadManager');
|
||
|
$composer->setDownloadManager($manager);
|
||
|
|
||
|
$this->assertEquals($manager,$composer->getDownloadManager());
|
||
|
}
|
||
|
|
||
|
public function testSetGetInstallationManager()
|
||
|
{
|
||
|
$composer = new Composer();
|
||
|
$manager = $this->getMock('Composer\Installer\InstallationManager');
|
||
|
$composer->setInstallationManager($manager);
|
||
|
|
||
|
$this->assertEquals($manager,$composer->getInstallationManager());
|
||
|
}
|
||
|
}
|