🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
29 lines
1.3 KiB
PHP
Executable File
29 lines
1.3 KiB
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
|
|
/**
|
|
|
|
title=测试 gitlabModel::isWebhookExists();
|
|
timeout=0
|
|
cid=0
|
|
|
|
- 执行gitlabTest模块的isWebhookExistsTest方法,参数是1, 'http://api.php/v1/gitlab/webhook?repoID=1' @1
|
|
- 执行gitlabTest模块的isWebhookExistsTest方法,参数是1, 'http://api.php/v1/gitlab/webhook?repoID=999' @0
|
|
- 执行gitlabTest模块的isWebhookExistsTest方法,参数是1, '' @0
|
|
- 执行gitlabTest模块的isWebhookExistsTest方法,参数是999, 'http://api.php/v1/gitlab/webhook?repoID=1' @0
|
|
- 执行gitlabTest模块的isWebhookExistsTest方法,参数是1, 'http://api.php/v1/gitlab/webhook?repoID=1¶m=test%20value' @0
|
|
|
|
*/
|
|
|
|
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
|
include dirname(__FILE__, 2) . '/lib/gitlab.unittest.class.php';
|
|
|
|
su('admin');
|
|
|
|
$gitlabTest = new gitlabTest();
|
|
|
|
r($gitlabTest->isWebhookExistsTest(1, 'http://api.php/v1/gitlab/webhook?repoID=1')) && p() && e('1');
|
|
r($gitlabTest->isWebhookExistsTest(1, 'http://api.php/v1/gitlab/webhook?repoID=999')) && p() && e('0');
|
|
r($gitlabTest->isWebhookExistsTest(1, '')) && p() && e('0');
|
|
r($gitlabTest->isWebhookExistsTest(999, 'http://api.php/v1/gitlab/webhook?repoID=1')) && p() && e('0');
|
|
r($gitlabTest->isWebhookExistsTest(1, 'http://api.php/v1/gitlab/webhook?repoID=1¶m=test%20value')) && p() && e('0'); |