Files
EasySoft-ZenTaoPMS/module/gitlab/test/model/getbyid.php
T

31 lines
602 B
PHP
Executable File

#!/usr/bin/env php
<?php
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/gitlab.class.php';
su('admin');
/**
title=测试gitlabModel->gitById();
cid=1
pid=1
使用存在的ID >> 3
使用空的ID >> 0
使用不存在的ID >> 0
*/
$gitlab = new gitlabTest();
$gitlabID = 1;
r($gitlab->getById($gitlabID)) && p('id') && e('1'); // 使用存在的ID
$gitlabID = 0;
r($gitlab->getById($gitlabID)) && p() && e(0); // 使用空的ID
$gitlabID = 111;
r($gitlab->getById($gitlabID)) && p() && e(0); // 使用不存在的ID
system("./ztest init");