blessing-skin-server/tests/HttpTest/ViewTest/ComposersTest/UserMenuComposerTest.php
2020-01-13 08:37:57 +08:00

23 lines
568 B
PHP

<?php
namespace Tests;
use App\Models\User;
class UserMenuComposerTest extends TestCase
{
public function testAvatar()
{
$user = factory(User::class)->create();
$this->actingAs($user)
->get('/')
->assertSee(url('/avatar/user/'.$user->uid.'?size=25'));
$this->actingAs($user)
->get('/skinlib')
->assertSee(url('/avatar/user/'.$user->uid.'?size=25'));
$this->actingAs($user)
->get('/user')
->assertSee(url('/avatar/user/'.$user->uid.'?size=25'));
}
}