Codeception。插入多条记录

问题描述 投票:0回答:1

是否可以在Codeception中向数据库插入几条记录?该代码无效,但也许还有其他选择。

$this->tester->haveRecord('vacations',
            ['destination' => $this->"Place 1"],
            ['destination' => $this->"Place 2"]);
php phpunit codeception
1个回答
0
投票

将它分成两部分效果很好。

$this->tester->haveRecord('vacations',
            ['destination' => $this->"Place 1"]);
$this->tester->haveRecord('vacations',
            ['destination' => $this->"Place 2"]);
© www.soinside.com 2019 - 2024. All rights reserved.