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