本文整理汇总了PHP中Drupal\migrate\Entity\Migration::expects方法的典型用法代码示例。如果您正苦于以下问题:PHP Migration::expects方法的具体用法?PHP Migration::expects怎么用?PHP Migration::expects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Drupal\migrate\Entity\Migration
的用法示例。
在下文中一共展示了Migration::expects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testOutdatedHighwater
/**
* Test that an outdated highwater mark does not cause a row to be imported.
*/
public function testOutdatedHighwater()
{
$source = $this->getSource([], [], MigrateIdMapInterface::STATUS_IMPORTED);
// Set the originalHighwater to something higher than our timestamp.
$this->migration->expects($this->any())->method('getHighwater')->willReturn($this->row['timestamp'] + 1);
// The current highwater mark is now higher than the row timestamp so no row
// is expected.
$source->rewind();
$this->assertNull($source->current(), 'Original highwater mark is higher than incoming row timestamp.');
}