本文整理汇总了PHP中Composer\Package\Package::setDevRequires方法的典型用法代码示例。如果您正苦于以下问题:PHP Package::setDevRequires方法的具体用法?PHP Package::setDevRequires怎么用?PHP Package::setDevRequires使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Composer\Package\Package
的用法示例。
在下文中一共展示了Package::setDevRequires方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testPackageNotExists
public function testPackageNotExists()
{
$io = new NullIO();
$pkg = new Package('test/test', 1, 1);
$pkg->setRequires([]);
$pkg->setDevRequires([]);
$this->assertFalse(Setup::checkDependencies($io, $pkg));
}
示例2: dataGetRequired
/**
* @return array
*/
public function dataGetRequired()
{
$package = new Package('vendor/name', '1.0.0.0', '1.0');
$link = new Link('test', 'name');
$devLink = new Link('devTest', 'name');
$package->setRequires([$link]);
$package->setDevRequires([$devLink]);
$data = [];
$data['both require false'] = [[], $package, false, false];
$data['require true'] = [[$link], $package, true, false];
$data['requireDev true'] = [[$devLink], $package, false, true];
$data['both require true'] = [[$link, $devLink], $package, true, true];
return $data;
}
示例3: dataGetRequired
public function dataGetRequired()
{
$package = new Package('vendor/name', '1.0.0.0', '1.0');
$link = new Link('test', 'name');
$devLink = new Link('devTest', 'name');
$package->setRequires(array($link));
$package->setDevRequires(array($devLink));
$data = array();
$data['both require false'] = array(array(), $package, false, false);
$data['require true'] = array(array($link), $package, true, false);
$data['requireDev true'] = array(array($devLink), $package, false, true);
$data['both require true'] = array(array($link, $devLink), $package, true, true);
return $data;
}