本文整理汇总了PHP中GitRepository::setNotifiedMails方法的典型用法代码示例。如果您正苦于以下问题:PHP GitRepository::setNotifiedMails方法的具体用法?PHP GitRepository::setNotifiedMails怎么用?PHP GitRepository::setNotifiedMails使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GitRepository
的用法示例。
在下文中一共展示了GitRepository::setNotifiedMails方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetMailHookConfig
public function testGetMailHookConfig()
{
$prj = new MockProject($this);
$prj->setReturnValue('getUnixName', 'project1');
$prj->setReturnValue('getId', 101);
// ShowRev
$repo = new GitRepository();
$repo->setId(5);
$repo->setProject($prj);
$repo->setName('test_default');
$this->assertIdentical(file_get_contents($this->_fixDir . '/gitolite-mail-config/mailhook-rev.txt'), $this->project_serializer->fetchMailHookConfig($prj, $repo));
// ShowRev + Mail
$repo = new GitRepository();
$repo->setId(5);
$repo->setProject($prj);
$repo->setName('test_default');
$repo->setNotifiedMails(array('john.doe@enalean.com', 'mme.michue@enalean.com'));
$this->assertIdentical(file_get_contents($this->_fixDir . '/gitolite-mail-config/mailhook-rev-mail.txt'), $this->project_serializer->fetchMailHookConfig($prj, $repo));
// ShowRev + Mailprefix
$repo = new GitRepository();
$repo->setId(5);
$repo->setProject($prj);
$repo->setName('test_default');
$repo->setNotifiedMails(array('john.doe@enalean.com', 'mme.michue@enalean.com'));
$repo->setMailPrefix('[KOIN] ');
$this->assertIdentical(file_get_contents($this->_fixDir . '/gitolite-mail-config/mailhook-rev-mail-prefix.txt'), $this->project_serializer->fetchMailHookConfig($prj, $repo));
// ShowRev + Mailprefix
$repo = new GitRepository();
$repo->setId(5);
$repo->setProject($prj);
$repo->setName('test_default');
$repo->setNotifiedMails(array('john.doe@enalean.com', 'mme.michue@enalean.com'));
$repo->setMailPrefix('["\\_o<"] \\t');
$this->assertIdentical(file_get_contents($this->_fixDir . '/gitolite-mail-config/mailhook-rev-mail-prefix-quote.txt'), $this->project_serializer->fetchMailHookConfig($prj, $repo));
}