\app\common\commandTesting

测试用例 Class Testing

Summary

Methods
Properties
Constants
No public methods found
No public properties found
No constants found
configure()
execute()
actionResetrcount()
actionRandom()
actionAdduser()
actionOrder()
No protected properties found
N/A
createAddress()
createUser()
getProduct()
makeOrder()
No private properties found
N/A

Methods

configure()

configure() 

execute()

execute(\think\console\Input  $input, \think\console\Output  $output) : mixed

命令调度

Parameters

\think\console\Input $input
\think\console\Output $output

Returns

mixed

actionResetrcount()

actionResetrcount(\think\console\Input  $input, \think\console\Output  $output) 

重置会员的推荐人数目

Parameters

\think\console\Input $input
\think\console\Output $output

actionRandom()

actionRandom(\think\console\Input  $input, \think\console\Output  $output) 

随机数据测试

Parameters

\think\console\Input $input
\think\console\Output $output

actionAdduser()

actionAdduser(\think\console\Input  $input, \think\console\Output  $output) 

添加会员的命令

Parameters

\think\console\Input $input
\think\console\Output $output

actionOrder()

actionOrder(\think\console\Input  $input, \think\console\Output  $output) 

调用下单命令

Parameters

\think\console\Input $input
\think\console\Output $output

createAddress()

createAddress(  $user) 

根据会员的推荐人的地址新增一条,如果没有,使用默认数据

Parameters

$user

createUser()

createUser(\think\console\Output  $output,   $username,   $password,   $parent,   $product) : boolean

创建一个会员,如果指定了商品id,则顺便下单购买了

Parameters

\think\console\Output $output
$username
$password
$parent
$product

Returns

boolean

getProduct()

getProduct(integer  $id) : array|null|\PDOStatement|string|\think\Model

获取指定产品用于下单,不指定id则随机获取一件激活商品

Parameters

integer $id

Returns

array|null|\PDOStatement|string|\think\Model

makeOrder()

makeOrder(\think\console\Output  $output,   $user,   $product) 

自动充值并下单

Parameters

\think\console\Output $output
$user
$product