当前位置: 首页>>代码示例>>PHP>>正文


PHP AbstractEntity::getDefaultBehavior方法代码示例

本文整理汇总了PHP中AbstractEntity::getDefaultBehavior方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractEntity::getDefaultBehavior方法的具体用法?PHP AbstractEntity::getDefaultBehavior怎么用?PHP AbstractEntity::getDefaultBehavior使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AbstractEntity的用法示例。


在下文中一共展示了AbstractEntity::getDefaultBehavior方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dataProviderForTestGetBehaviorWithRowData

 /**
  * Different cases to cover all code parts in AbstractEntity::getBehavior()
  *
  * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
  * @return array
  */
 public function dataProviderForTestGetBehaviorWithRowData()
 {
     return ["add/update behavior and row with delete in action column" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE, '$rowData' => [AbstractEntity::COLUMN_ACTION => AbstractEntity::COLUMN_ACTION_VALUE_DELETE], '$expectedBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE], "delete behavior and row with delete in action column" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE, '$rowData' => [AbstractEntity::COLUMN_ACTION => AbstractEntity::COLUMN_ACTION_VALUE_DELETE], '$expectedBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE], "custom behavior and row with delete in action column" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_CUSTOM, '$rowData' => [AbstractEntity::COLUMN_ACTION => AbstractEntity::COLUMN_ACTION_VALUE_DELETE], '$expectedBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE], "add/update behavior and row with update in action column" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE, '$rowData' => [AbstractEntity::COLUMN_ACTION => 'update'], '$expectedBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE], "delete behavior and row with update in action column" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE, '$rowData' => [AbstractEntity::COLUMN_ACTION => 'update'], '$expectedBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE], "custom behavior and row with update in action column" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_CUSTOM, '$rowData' => [AbstractEntity::COLUMN_ACTION => 'update'], '$expectedBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE], "add/update behavior and row with bogus string in action column" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE, '$rowData' => [AbstractEntity::COLUMN_ACTION => microtime(true)], '$expectedBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE], "delete behavior and row with bogus string in action column" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE, '$rowData' => [AbstractEntity::COLUMN_ACTION => microtime(true)], '$expectedBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE], "custom behavior and row with bogus string in action column" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_CUSTOM, '$rowData' => [AbstractEntity::COLUMN_ACTION => microtime(true)], '$expectedBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE], "add/update behavior and row with null in action column" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE, '$rowData' => [AbstractEntity::COLUMN_ACTION => null], '$expectedBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE], "delete behavior and row with null in action column" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE, '$rowData' => [AbstractEntity::COLUMN_ACTION => null], '$expectedBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE], "custom behavior and row with null in action column" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_CUSTOM, '$rowData' => [AbstractEntity::COLUMN_ACTION => null], '$expectedBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE], "add/update behavior and empty row" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE, '$rowData' => null, '$expectedBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE], "delete behavior and empty row" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE, '$rowData' => null, '$expectedBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE], "custom behavior and empty row" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_CUSTOM, '$rowData' => null, '$expectedBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_CUSTOM], "add/update behavior and row is empty array" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE, '$rowData' => [], '$expectedBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_ADD_UPDATE], "delete behavior and empty row is empty array" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE, '$rowData' => [], '$expectedBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE], "custom behavior and empty row is empty array" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_CUSTOM, '$rowData' => [], '$expectedBehavior' => AbstractEntity::getDefaultBehavior()], "custom behavior and row with delete in action column and empty available behaviors" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_CUSTOM, '$rowData' => [AbstractEntity::COLUMN_ACTION => AbstractEntity::COLUMN_ACTION_VALUE_DELETE], '$expectedBehavior' => AbstractEntity::getDefaultBehavior(), '$availableBehaviors' => []], "custom behavior and row with update in action column and empty available behaviors" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_CUSTOM, '$rowData' => [AbstractEntity::COLUMN_ACTION => 'update'], '$expectedBehavior' => AbstractEntity::getDefaultBehavior(), '$availableBehaviors' => []], "custom behavior and row with bogus string in action column and empty available behaviors" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_CUSTOM, '$rowData' => [AbstractEntity::COLUMN_ACTION => microtime(true)], '$expectedBehavior' => AbstractEntity::getDefaultBehavior(), '$availableBehaviors' => []], "custom behavior and row with null in action column and empty available behaviors" => ['$inputBehavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_CUSTOM, '$rowData' => [AbstractEntity::COLUMN_ACTION => null], '$expectedBehavior' => AbstractEntity::getDefaultBehavior(), '$availableBehaviors' => []]];
 }
开发者ID:,项目名称:,代码行数:10,代码来源:


注:本文中的AbstractEntity::getDefaultBehavior方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。