讨论数量: 0
L07 Laravel 教程 - Laravel TDD
/
本节我们来为测试准备一些辅助方法。
首先是signIn()
,用来在测试中登录用户。这个行为非常通用,所以我们放在 TestCase.php
中(注意顶部的 use App\Models\User;
):
tests/TestCase.php
.
.
.
use App\Models\User;
abstract class TestCase extends BaseTestCase
{
.
本文章首发在 LearnKu.com 网站上。
粤ICP备18099781号-6
|
粤公网安备 44030502004330号
|
违法和不良信息举报
由 Summer 设计和编码 ❤