本文整理汇总了PHP中MailForm::setReturnPathByIndex方法的典型用法代码示例。如果您正苦于以下问题:PHP MailForm::setReturnPathByIndex方法的具体用法?PHP MailForm::setReturnPathByIndex怎么用?PHP MailForm::setReturnPathByIndex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MailForm
的用法示例。
在下文中一共展示了MailForm::setReturnPathByIndex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testAddReturnPathByIndexAndGetReturnPathArrayByIndex
public function testAddReturnPathByIndexAndGetReturnPathArrayByIndex()
{
$getReturnPathArrayByIndex = getMethod('MailForm', 'getReturnPathArrayByIndex');
$mailform = new MailForm();
$mailform->setReturnPathByIndex(1, 'path1@example.com', 'path1');
$paths = $getReturnPathArrayByIndex->invokeArgs($mailform, array(1));
$this->assertCount(1, $paths);
$this->assertArrayHasKey('path1@example.com', $paths);
$this->assertEquals('path1', $paths['path1@example.com']);
$mailform->setReturnPathByIndex(1, 'path2@example.com', 'path2');
$paths = $getReturnPathArrayByIndex->invokeArgs($mailform, array(1));
$this->assertCount(1, $paths);
$this->assertArrayHasKey('path2@example.com', $paths);
$this->assertEquals('path2', $paths['path2@example.com']);
$mailform->setReturnPathByIndex(2, 'path3@example.com', 'path3');
$paths = $getReturnPathArrayByIndex->invokeArgs($mailform, array(2));
$this->assertCount(1, $paths);
$this->assertArrayHasKey('path3@example.com', $paths);
$this->assertEquals('path3', $paths['path3@example.com']);
}