znt/module/pivot/test/zen/getdrill.php

49 lines
2.1 KiB
PHP
Executable file
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env php
<?php
/**
title=测试 pivotZen::getDrill();
timeout=0
cid=17457
- 执行pivotTest模块的getDrillTest方法参数是1, '1', 'status', 'published' 属性field @status
- 执行pivotTest模块的getDrillTest方法参数是2, '1', 'priority', 'published' 属性field @priority
- 执行pivotTest模块的getDrillTest方法参数是3, '1', 'severity', 'published' 属性field @severity
- 执行pivotTest模块的getDrillTest方法参数是4, '1', 'type', 'published' 属性field @type
- 执行pivotTest模块的getDrillTest方法参数是5, '1', 'openedBy', 'published' 属性field @openedBy
- 执行pivotTest模块的getDrillTest方法参数是6, '1', 'product', 'published' 属性field @product
- 执行pivotTest模块的getDrillTest方法参数是7, '1', 'status', 'published' 属性field @status
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
include dirname(__FILE__, 2) . '/lib/pivotzen.unittest.class.php';
zenData('pivot')->gen(10);
$pivotdrill = zenData('pivotdrill');
$pivotdrill->pivot->range('1-7');
$pivotdrill->version->range('1');
$pivotdrill->field->range('status,priority,severity,type,openedBy,product,status');
$pivotdrill->object->range('bug,bug,bug,bug,user,product,bug');
$pivotdrill->whereSql->range('id > 0');
$pivotdrill->condition->range('{"status":"active"}');
$pivotdrill->status->range('published');
$pivotdrill->account->range('admin');
$pivotdrill->type->range('manual');
$pivotdrill->gen(7);
zenData('user')->gen(1);
su('admin');
$pivotTest = new pivotZenTest();
r($pivotTest->getDrillTest(1, '1', 'status', 'published')) && p('field') && e('status');
r($pivotTest->getDrillTest(2, '1', 'priority', 'published')) && p('field') && e('priority');
r($pivotTest->getDrillTest(3, '1', 'severity', 'published')) && p('field') && e('severity');
r($pivotTest->getDrillTest(4, '1', 'type', 'published')) && p('field') && e('type');
r($pivotTest->getDrillTest(5, '1', 'openedBy', 'published')) && p('field') && e('openedBy');
r($pivotTest->getDrillTest(6, '1', 'product', 'published')) && p('field') && e('product');
r($pivotTest->getDrillTest(7, '1', 'status', 'published')) && p('field') && e('status');