#!/usr/bin/env php id = $i; $obj->name = 'Task ' . $i; $normalList[$i] = $obj; } $largeList = array(); for($i = 1; $i <= 30; $i++) { $obj = new stdClass(); $obj->id = $i; $obj->name = 'Task ' . $i; $largeList[$i] = $obj; } $fields = array(); // 5. 🔴 强制要求:必须包含至少5个测试步骤 r($transferTest->buildNextListTest($emptyList, 0, $fields, 1, 'task')) && p() && e('0'); // 步骤1:空列表 r(strlen($transferTest->buildNextListTest($normalList, 0, $fields, 1, 'task')) > 0) && p() && e('1'); // 步骤2:正常列表生成HTML r(strpos($transferTest->buildNextListTest($normalList, 2, $fields, 1, 'task'), 'id') !== false) && p() && e('1'); // 步骤3:lastID过滤 r(substr_count($transferTest->buildNextListTest($largeList, 0, $fields, 1, 'task'), 'buildNextListTest($normalList, 5, $fields, 1, 'task')) && p() && e('0'); // 步骤5:边界情况