Rename the tests to pass phpcs checks

This commit is contained in:
Jonny Barnes 2021-03-17 18:38:18 +00:00
parent 3946e9aac4
commit d5bbed1eac
52 changed files with 1329 additions and 1062 deletions

View file

@ -1,33 +1,38 @@
<?php
declare(strict_types=1);
namespace Tests\Feature;
use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
class ShortURLsControllerTest extends TestCase
{
public function test_short_domain_redirects_to_long_domain()
/** @test */
public function shortDomainRedirectsToLongDomain(): void
{
$response = $this->get('http://' . config('app.shorturl'));
$response = $this->get('https://' . config('app.shorturl'));
$response->assertRedirect(config('app.url'));
}
public function test_short_domain_slashat_redirects_to_twitter()
/** @test */
public function shortDomainSlashAtRedirectsToTwitter(): void
{
$response = $this->get('http://' . config('app.shorturl') . '/@');
$response = $this->get('https://' . config('app.shorturl') . '/@');
$response->assertRedirect('https://twitter.com/jonnybarnes');
}
public function test_short_domain_slasht_redirects_to_long_domain_slash_notes()
/** @test */
public function shortDomainSlashTRedirectsToLongDomainSlashNotes(): void
{
$response = $this->get('http://' . config('app.shorturl') . '/t/E');
$response = $this->get('https://' . config('app.shorturl') . '/t/E');
$response->assertRedirect(config('app.url') . '/notes/E');
}
public function test_short_domain_slashb_redirects_to_long_domain_slash_blog()
/** @test */
public function shortDomainSlashBRedirectsToLongDomainSlashBlog(): void
{
$response = $this->get('http://' . config('app.shorturl') . '/b/1');
$response = $this->get('https://' . config('app.shorturl') . '/b/1');
$response->assertRedirect(config('app.url') . '/blog/s/1');
}
}