28 lines
808 B
PHP
Executable File
28 lines
808 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
|
include dirname(__FILE__, 2) . '/score.class.php';
|
|
su('admin');
|
|
|
|
/**
|
|
|
|
title=测试 scoreModel->fixKey();
|
|
cid=1
|
|
pid=1
|
|
|
|
action为created >> create
|
|
action为opened >> create
|
|
action为bugconfirmed >> confirm
|
|
action为fixed, 不存在于strings中 >> fixed
|
|
|
|
*/
|
|
|
|
$actionList = array('created', 'opened', 'bugconfirmed', 'fixed');
|
|
|
|
$score = new scoreTest();
|
|
|
|
r($score->fixKeyTest($actionList[0])) && p('') && e('create'); // action为created
|
|
r($score->fixKeyTest($actionList[1])) && p('') && e('create'); // action为opened
|
|
r($score->fixKeyTest($actionList[2])) && p('') && e('confirm'); // action为bugconfirmed
|
|
r($score->fixKeyTest($actionList[3])) && p('') && e('fixed'); // action为fixed, 不存在于strings中
|