贡献者:3
讨论数量: 0
L07 Laravel 教程 - Laravel TDD
/
与业务逻辑类似,我们的测试其实也可以抽取成 trait
来达到简化代码的目的。
新建VoteUpContractTest
:
tests/Feature/VoteUpContractTest.php
<?php
namespace Tests\Feature;
use App\Models\User;
use Illuminate\Support\Facades\Auth;
trait VoteUpContractTest
{
/** @test */
public function guest_can_not_vote_...
本文章首发在 LearnKu.com 网站上。
粤ICP备18099781号-6
|
粤公网安备 44030502004330号
|
违法和不良信息举报
由 Summer 设计和编码 ❤