本文整理匯總了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;
}