第一段
第二段
续行
走进蚕桑文化。
', 'route_plans' => [[ 'date_label' => '第一天', 'items' => [[ 'time' => '09:00', 'activity' => '开营仪式', 'location' => '活动中心', ]], ]], 'courses' => [[ 'sort' => 1, 'name' => '缫丝体验', 'content' => '了解传统缫丝工艺', ]], 'fee_html' => '680元/人
', 'implementation_html' => '2026年7月1日第1场
', 'season_options' => [ ['value' => 'spring', 'label' => '春季'], ['value' => 'summer', 'label' => '夏季'], ['value' => 'autumn', 'label' => '秋季'], ['value' => 'winter', 'label' => '冬季'], ], 'audience_options' => [ ['value' => 'kindergarten', 'label' => '幼儿园'], ['value' => 'primary', 'label' => '小学'], ['value' => 'junior', 'label' => '初中'], ['value' => 'high', 'label' => '高中'], ['value' => 'all', 'label' => '全学段'], ], ]); $this->assertFileExists($path); $zip = new ZipArchive(); $this->assertTrue($zip->open($path) === true); $xml = (string) $zip->getFromName('word/document.xml'); $mediaCount = 0; for ($i = 0; $i < $zip->numFiles; $i++) { $name = (string) $zip->getNameIndex($i); if (str_starts_with($name, 'word/media/')) { $mediaCount++; } } $zip->close(); foreach ([ '一、线路基本情况', '二、线路简介', '三、线路规划', '四、研学课程', '五、线路收费标准', '六、线路计划实施情况', '太湖蚕桑研学', '苏州市科协', '苏州丝绸博物馆', '走进蚕桑文化', '开营仪式', '缫丝体验', '680元/人', '封面图', ] as $needle) { $this->assertStringContainsString($needle, $xml, "missing {$needle}"); } $this->assertGreaterThan(0, $mediaCount, 'cover image should be embedded'); $phpWord = IOFactory::load($path); $this->assertNotEmpty($phpWord->getSections()); @unlink($path); @unlink($png); } }