Composer\Satis\Builder\WebBuilder::setRootPackage PHP Method

setRootPackage() public method

Defines the root package of the repository.
public setRootPackage ( Composer\Package\RootPackageInterface $rootPackage )
$rootPackage Composer\Package\RootPackageInterface The root package
    public function setRootPackage(RootPackageInterface $rootPackage)
    {
        $this->rootPackage = $rootPackage;
        return $this;
    }

Usage Example

Example #1
0
 /**
  * @dataProvider dataAbandoned
  */
 public function testAbandoned($abandoned, $expected)
 {
     $webBuilder = new WebBuilder(new NullOutput(), vfsStream::url('build'), array(), false);
     $webBuilder->setRootPackage($this->rootPackage);
     $this->package->setAbandoned($abandoned);
     $webBuilder->dump(array($this->package));
     $html = $this->root->getChild('build/index.html')->getContent();
     $this->assertRegExp('/Package vendor\\/name is abandoned, you should avoid using it/', $html);
     $this->assertRegExp($expected, $html);
 }
All Usage Examples Of Composer\Satis\Builder\WebBuilder::setRootPackage