<?php
declare(strict_types=1);
namespace think {class Collection {private $items;public function __construct(array $items=[]){$this->items=$items;}public function toArray():array{return $this->items;}}}
namespace app\common\model {class UploadFile {public static array $fixture=[];protected function getNewQuery(){return new \ContractQuery;}protected function setQueryDefaultValue(array $p,array $d):array{return array_merge($d,$p);}}}
namespace {class ContractQuery {public function where(...$args){return $this;}public function order(...$args){return $this;}public function select(){return new \think\Collection(\app\common\model\UploadFile::$fixture);}}
require $argv[1];$failed=0;$passed=0;foreach([[],[['file_id'=>7,'file_name'=>'自有活动二维码.png']]] as $rows){\app\common\model\UploadFile::$fixture=$rows;try{$got=(new \app\terminal\model\UploadFile)->getAll(['file_ids'=>[7]]);if($got!==$rows)throw new RuntimeException('Exact array content');$passed++;}catch(Throwable $e){$failed++;echo get_class($e),': ',$e->getMessage(),"\n";}}echo json_encode(['passed'=>$passed,'failed'=>$failed,'scope'=>'Pure return contract with in-memory query dependency; no integration claim']),"\n";exit($failed?1:0);}
