本文整理匯總了PHP中TestHelper::emptyDar方法的典型用法代碼示例。如果您正苦於以下問題:PHP TestHelper::emptyDar方法的具體用法?PHP TestHelper::emptyDar怎麽用?PHP TestHelper::emptyDar使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TestHelper
的用法示例。
在下文中一共展示了TestHelper::emptyDar方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: returnsEmptyDar
/**
* Ease returns of empty DatabaseAccessResult
*
* Example:
* stub('Dao')->getStuff()->returnsEmptyDar()
*/
public function returnsEmptyDar()
{
return $this->returns(TestHelper::emptyDar());
}
示例2: itReturnsEmptyArrayWhenNoSharedFields
public function itReturnsEmptyArrayWhenNoSharedFields()
{
$project_id = 1;
$dar = TestHelper::emptyDar();
$factory = $this->GivenSearchAllSharedTargetsOfProjectReturnsDar($dar, $project_id);
$this->ThenICompareProjectSharedFieldsWithExpectedResult($factory, $project_id, array());
}
示例3: itDoesntRemoveTheGerritReservedKeys
public function itDoesntRemoveTheGerritReservedKeys()
{
$this->user_manager->setReturnValueAt(0, 'getUsersWithSshKey', TestHelper::arrayToDar(new PFUser(array('authorized_keys' => $this->key1, 'user_name' => 'john_do'))));
$this->mass_dumper->dumpSSHKeys();
$keyfile = 'forge__gerrit_1@0.pub';
touch($this->_glAdmDir . '/keydir/' . $keyfile);
$this->gitExec->add($this->_glAdmDir . '/keydir/' . $keyfile);
$this->gitExec->commit("Gerrit key");
$this->assertEmptyGitStatus();
$this->user_manager->setReturnValueAt(1, 'getUsersWithSshKey', TestHelper::emptyDar());
$this->mass_dumper->dumpSSHKeys();
$this->assertFalse(is_file($this->_glAdmDir . '/keydir/john_do@0.pub'));
$this->assertTrue(is_file($this->_glAdmDir . '/keydir/' . $keyfile));
}