Laravel Pint fixes
This commit is contained in:
parent
7a58287b34
commit
126bb29ae2
50 changed files with 299 additions and 299 deletions
|
@ -14,7 +14,7 @@ class AdminHomeControllerTest extends TestCase
|
|||
use RefreshDatabase;
|
||||
|
||||
#[Test]
|
||||
public function adminHomepageLoads(): void
|
||||
public function admin_homepage_loads(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
|
||||
|
|
|
@ -11,21 +11,21 @@ use Tests\TestCase;
|
|||
class AdminTest extends TestCase
|
||||
{
|
||||
#[Test]
|
||||
public function adminPageRedirectsUnauthorisedUsersToLoginPage(): void
|
||||
public function admin_page_redirects_unauthorised_users_to_login_page(): void
|
||||
{
|
||||
$response = $this->get('/admin');
|
||||
$response->assertRedirect('/login');
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function loginPageLoads(): void
|
||||
public function login_page_loads(): void
|
||||
{
|
||||
$response = $this->get('/login');
|
||||
$response->assertViewIs('login');
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function loginAttemptWithBadCredentialsFails(): void
|
||||
public function login_attempt_with_bad_credentials_fails(): void
|
||||
{
|
||||
$response = $this->post('/login', [
|
||||
'username' => 'bad',
|
||||
|
@ -35,7 +35,7 @@ class AdminTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function loginSucceeds(): void
|
||||
public function login_succeeds(): void
|
||||
{
|
||||
User::factory([
|
||||
'name' => 'admin',
|
||||
|
@ -51,7 +51,7 @@ class AdminTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function whenLoggedInRedirectsToAdminPage(): void
|
||||
public function when_logged_in_redirects_to_admin_page(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
$response = $this->actingAs($user)->get('/login');
|
||||
|
@ -59,14 +59,14 @@ class AdminTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function loggedOutUsersSimplyRedirected(): void
|
||||
public function logged_out_users_simply_redirected(): void
|
||||
{
|
||||
$response = $this->get('/logout');
|
||||
$response->assertRedirect('/');
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function loggedInUsersShownLogoutForm(): void
|
||||
public function logged_in_users_shown_logout_form(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
$response = $this->actingAs($user)->get('/logout');
|
||||
|
@ -74,7 +74,7 @@ class AdminTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function loggedInUsersCanLogout(): void
|
||||
public function logged_in_users_can_logout(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
$response = $this->actingAs($user)->post('/logout');
|
||||
|
|
|
@ -17,7 +17,7 @@ class ArticlesTest extends TestCase
|
|||
use RefreshDatabase;
|
||||
|
||||
#[Test]
|
||||
public function adminArticlesPageLoads(): void
|
||||
public function admin_articles_page_loads(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
|
||||
|
@ -27,7 +27,7 @@ class ArticlesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanLoadFormToCreateArticle(): void
|
||||
public function admin_can_load_form_to_create_article(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
|
||||
|
@ -37,7 +37,7 @@ class ArticlesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function admiNCanCreateNewArticle(): void
|
||||
public function admi_n_can_create_new_article(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
|
||||
|
@ -50,7 +50,7 @@ class ArticlesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanCreateNewArticleWithFile(): void
|
||||
public function admin_can_create_new_article_with_file(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$faker = Factory::create();
|
||||
|
@ -75,7 +75,7 @@ class ArticlesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function articleCanLoadFormToEditArticle(): void
|
||||
public function article_can_load_form_to_edit_article(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$article = Article::factory()->create([
|
||||
|
@ -88,7 +88,7 @@ class ArticlesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanEditArticle(): void
|
||||
public function admin_can_edit_article(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$article = Article::factory()->create();
|
||||
|
@ -106,7 +106,7 @@ class ArticlesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanDeleteArticle(): void
|
||||
public function admin_can_delete_article(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$article = Article::factory()->create();
|
||||
|
|
|
@ -15,7 +15,7 @@ class BioTest extends TestCase
|
|||
use RefreshDatabase;
|
||||
|
||||
#[Test]
|
||||
public function adminBiosPageLoads(): void
|
||||
public function admin_bios_page_loads(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
|
||||
|
@ -25,7 +25,7 @@ class BioTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanCreateBio(): void
|
||||
public function admin_can_create_bio(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
|
||||
|
@ -38,7 +38,7 @@ class BioTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanLoadExistingBio(): void
|
||||
public function admin_can_load_existing_bio(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$bio = Bio::factory()->create([
|
||||
|
@ -51,7 +51,7 @@ class BioTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanEditBio(): void
|
||||
public function admin_can_edit_bio(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$bio = Bio::factory()->create();
|
||||
|
|
|
@ -15,7 +15,7 @@ class ClientsTest extends TestCase
|
|||
use RefreshDatabase;
|
||||
|
||||
#[Test]
|
||||
public function clientsPageLoads(): void
|
||||
public function clients_page_loads(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
|
||||
|
@ -25,7 +25,7 @@ class ClientsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanLoadFormToCreateClient(): void
|
||||
public function admin_can_load_form_to_create_client(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
|
||||
|
@ -35,7 +35,7 @@ class ClientsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanCreateNewClient(): void
|
||||
public function admin_can_create_new_client(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
|
||||
|
@ -51,7 +51,7 @@ class ClientsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanLoadEditFormForClient(): void
|
||||
public function admin_can_load_edit_form_for_client(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$client = MicropubClient::factory()->create([
|
||||
|
@ -64,7 +64,7 @@ class ClientsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanEditClient(): void
|
||||
public function admin_can_edit_client(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$client = MicropubClient::factory()->create();
|
||||
|
@ -82,7 +82,7 @@ class ClientsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanDeleteClient(): void
|
||||
public function admin_can_delete_client(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$client = MicropubClient::factory()->create([
|
||||
|
|
|
@ -29,7 +29,7 @@ class ContactsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function contactIndexPageLoads(): void
|
||||
public function contact_index_page_loads(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
|
||||
|
@ -38,7 +38,7 @@ class ContactsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function contactCreatePageLoads(): void
|
||||
public function contact_create_page_loads(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
|
||||
|
@ -47,7 +47,7 @@ class ContactsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanCreateNewContact(): void
|
||||
public function admin_can_create_new_contact(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
|
||||
|
@ -64,7 +64,7 @@ class ContactsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanSeeFormToEditContact(): void
|
||||
public function admin_can_see_form_to_edit_contact(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$contact = Contact::factory()->create();
|
||||
|
@ -74,7 +74,7 @@ class ContactsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanUpdateContact(): void
|
||||
public function admin_can_update_contact(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$contact = Contact::factory()->create();
|
||||
|
@ -93,7 +93,7 @@ class ContactsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanEditContactAndUploadAvatar(): void
|
||||
public function admin_can_edit_contact_and_upload_avatar(): void
|
||||
{
|
||||
copy(__DIR__ . '/../../aaron.png', sys_get_temp_dir() . '/tantek.png');
|
||||
$path = sys_get_temp_dir() . '/tantek.png';
|
||||
|
@ -116,7 +116,7 @@ class ContactsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanDeleteContact(): void
|
||||
public function admin_can_delete_contact(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$contact = Contact::factory()->create(['nick' => 'tantek']);
|
||||
|
@ -134,7 +134,7 @@ class ContactsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanTriggerRetrievalOfRemoteAvatar(): void
|
||||
public function admin_can_trigger_retrieval_of_remote_avatar(): void
|
||||
{
|
||||
$html = <<<'HTML'
|
||||
<div class="h-card">
|
||||
|
@ -163,7 +163,7 @@ class ContactsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function gettingRemoteAvatarFailsGracefullyWithRemoteNotFound(): void
|
||||
public function getting_remote_avatar_fails_gracefully_with_remote_not_found(): void
|
||||
{
|
||||
$mock = new MockHandler([
|
||||
new Response(404),
|
||||
|
@ -180,7 +180,7 @@ class ContactsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function gettingRemoteAvatarFailsGracefullyWithRemoteError(): void
|
||||
public function getting_remote_avatar_fails_gracefully_with_remote_error(): void
|
||||
{
|
||||
$html = <<<'HTML'
|
||||
<div class="h-card">
|
||||
|
@ -203,7 +203,7 @@ class ContactsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function gettingRemoteAvatarFailsGracefullyForContactWithNoHompage(): void
|
||||
public function getting_remote_avatar_fails_gracefully_for_contact_with_no_hompage(): void
|
||||
{
|
||||
$contact = Contact::create([
|
||||
'nick' => 'fred',
|
||||
|
|
|
@ -17,7 +17,7 @@ class LikesTest extends TestCase
|
|||
use RefreshDatabase;
|
||||
|
||||
#[Test]
|
||||
public function likesPageLoads(): void
|
||||
public function likes_page_loads(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
|
||||
|
@ -27,7 +27,7 @@ class LikesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function likeCreateFormLoads(): void
|
||||
public function like_create_form_loads(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
|
||||
|
@ -37,7 +37,7 @@ class LikesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanCreateLike(): void
|
||||
public function admin_can_create_like(): void
|
||||
{
|
||||
Queue::fake();
|
||||
$user = User::factory()->make();
|
||||
|
@ -53,7 +53,7 @@ class LikesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function likeEditFormLoads(): void
|
||||
public function like_edit_form_loads(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$like = Like::factory()->create();
|
||||
|
@ -64,7 +64,7 @@ class LikesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanEditLike(): void
|
||||
public function admin_can_edit_like(): void
|
||||
{
|
||||
Queue::fake();
|
||||
$user = User::factory()->make();
|
||||
|
@ -82,7 +82,7 @@ class LikesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanDeleteLike(): void
|
||||
public function admin_can_delete_like(): void
|
||||
{
|
||||
$like = Like::factory()->create();
|
||||
$url = $like->url;
|
||||
|
|
|
@ -17,7 +17,7 @@ class NotesTest extends TestCase
|
|||
use RefreshDatabase;
|
||||
|
||||
#[Test]
|
||||
public function notesPageLoads(): void
|
||||
public function notes_page_loads(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
|
||||
|
@ -26,7 +26,7 @@ class NotesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function noteCreatePageLoads(): void
|
||||
public function note_create_page_loads(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
|
||||
|
@ -35,7 +35,7 @@ class NotesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanCreateNewNote(): void
|
||||
public function admin_can_create_new_note(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
|
||||
|
@ -49,7 +49,7 @@ class NotesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function noteEditFormLoads(): void
|
||||
public function note_edit_form_loads(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$note = Note::factory()->create();
|
||||
|
@ -59,7 +59,7 @@ class NotesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanEditNote(): void
|
||||
public function admin_can_edit_note(): void
|
||||
{
|
||||
Queue::fake();
|
||||
$user = User::factory()->make();
|
||||
|
@ -78,7 +78,7 @@ class NotesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanDeleteNote(): void
|
||||
public function admin_can_delete_note(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$note = Note::factory()->create();
|
||||
|
|
|
@ -15,7 +15,7 @@ class PlacesTest extends TestCase
|
|||
use RefreshDatabase;
|
||||
|
||||
#[Test]
|
||||
public function placesPageLoads(): void
|
||||
public function places_page_loads(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
|
||||
|
@ -24,7 +24,7 @@ class PlacesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function createPlacePageLoads(): void
|
||||
public function create_place_page_loads(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
|
||||
|
@ -33,7 +33,7 @@ class PlacesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanCreateNewPlace(): void
|
||||
public function admin_can_create_new_place(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
|
||||
|
@ -50,7 +50,7 @@ class PlacesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function editPlacePageLoads(): void
|
||||
public function edit_place_page_loads(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$place = Place::factory()->create();
|
||||
|
@ -60,7 +60,7 @@ class PlacesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function adminCanUpdatePlace(): void
|
||||
public function admin_can_update_place(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$place = Place::factory()->create([
|
||||
|
|
|
@ -15,14 +15,14 @@ class ArticlesTest extends TestCase
|
|||
use RefreshDatabase;
|
||||
|
||||
#[Test]
|
||||
public function articlesPageLoads(): void
|
||||
public function articles_page_loads(): void
|
||||
{
|
||||
$response = $this->get('/blog');
|
||||
$response->assertViewIs('articles.index');
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function singleArticlePageLoads()
|
||||
public function single_article_page_loads()
|
||||
{
|
||||
$article = Article::factory()->create();
|
||||
$response = $this->get($article->link);
|
||||
|
@ -30,7 +30,7 @@ class ArticlesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function wrongDateInUrlRedirectsToCorrectDate()
|
||||
public function wrong_date_in_url_redirects_to_correct_date()
|
||||
{
|
||||
$article = Article::factory()->create();
|
||||
$response = $this->get('/blog/1900/01/' . $article->titleurl);
|
||||
|
@ -38,7 +38,7 @@ class ArticlesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function oldUrlsWithIdAreRedirected()
|
||||
public function old_urls_with_id_are_redirected()
|
||||
{
|
||||
$article = Article::factory()->create();
|
||||
$num60Id = resolve(Numbers::class)->numto60($article->id);
|
||||
|
@ -47,21 +47,21 @@ class ArticlesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function unknownSlugGetsNotFoundResponse()
|
||||
public function unknown_slug_gets_not_found_response()
|
||||
{
|
||||
$response = $this->get('/blog/' . date('Y') . '/' . date('m') . '/unknown-slug');
|
||||
$response->assertNotFound();
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function unknownArticleIdGetsNotFoundResponse()
|
||||
public function unknown_article_id_gets_not_found_response()
|
||||
{
|
||||
$response = $this->get('/blog/s/22');
|
||||
$response->assertNotFound();
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function someUrlsDoNotParseCorrectly(): void
|
||||
public function some_urls_do_not_parse_correctly(): void
|
||||
{
|
||||
$response = $this->get('/blog/feed.js');
|
||||
$response->assertNotFound();
|
||||
|
|
|
@ -17,14 +17,14 @@ class BookmarksTest extends TestCase
|
|||
use RefreshDatabase, TestToken;
|
||||
|
||||
#[Test]
|
||||
public function bookmarksPageLoadsWithoutError(): void
|
||||
public function bookmarks_page_loads_without_error(): void
|
||||
{
|
||||
$response = $this->get('/bookmarks');
|
||||
$response->assertViewIs('bookmarks.index');
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function singleBookmarkPageLoadsWithoutError(): void
|
||||
public function single_bookmark_page_loads_without_error(): void
|
||||
{
|
||||
$bookmark = Bookmark::factory()->create();
|
||||
$response = $this->get('/bookmarks/' . $bookmark->id);
|
||||
|
@ -32,7 +32,7 @@ class BookmarksTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function whenBookmarkIsAddedUsingHttpSyntaxCheckJobToTakeScreenshotIsInvoked(): void
|
||||
public function when_bookmark_is_added_using_http_syntax_check_job_to_take_screenshot_is_invoked(): void
|
||||
{
|
||||
Queue::fake();
|
||||
|
||||
|
@ -50,7 +50,7 @@ class BookmarksTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function whenBookmarkIsAddedUsingJsonSyntaxCheckJobToTakeScreenshotIsInvoked(): void
|
||||
public function when_bookmark_is_added_using_json_syntax_check_job_to_take_screenshot_is_invoked(): void
|
||||
{
|
||||
Queue::fake();
|
||||
|
||||
|
@ -70,7 +70,7 @@ class BookmarksTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function whenTheBookmarkIsCreatedCheckNecessaryTagsAreAlsoCreated(): void
|
||||
public function when_the_bookmark_is_created_check_necessary_tags_are_also_created(): void
|
||||
{
|
||||
Queue::fake();
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ class ContactsTest extends TestCase
|
|||
* Check the `/contacts` page gives a good response.
|
||||
*/
|
||||
#[Test]
|
||||
public function contactsPageLoadsWithoutError(): void
|
||||
public function contacts_page_loads_without_error(): void
|
||||
{
|
||||
$response = $this->get('/contacts');
|
||||
$response->assertStatus(200);
|
||||
|
@ -27,7 +27,7 @@ class ContactsTest extends TestCase
|
|||
* Test an individual contact page with default profile image.
|
||||
*/
|
||||
#[Test]
|
||||
public function contactPageShouldFallbackToDefaultProfilePic(): void
|
||||
public function contact_page_should_fallback_to_default_profile_pic(): void
|
||||
{
|
||||
Contact::factory()->create([
|
||||
'nick' => 'tantek',
|
||||
|
@ -40,7 +40,7 @@ class ContactsTest extends TestCase
|
|||
* Test an individual contact page with a specific profile image.
|
||||
*/
|
||||
#[Test]
|
||||
public function contactPageShouldUseSpecificProfilePicIfPresent(): void
|
||||
public function contact_page_should_use_specific_profile_pic_if_present(): void
|
||||
{
|
||||
Contact::factory()->create([
|
||||
'nick' => 'aaron',
|
||||
|
@ -51,7 +51,7 @@ class ContactsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function unknownContactReturnsNotFoundResponse(): void
|
||||
public function unknown_contact_returns_not_found_response(): void
|
||||
{
|
||||
$response = $this->get('/contacts/unknown');
|
||||
$response->assertNotFound();
|
||||
|
|
|
@ -13,7 +13,7 @@ class CorsHeadersTest extends TestCase
|
|||
use TestToken;
|
||||
|
||||
#[Test]
|
||||
public function checkCorsHeadersOnMediaEndpoint(): void
|
||||
public function check_cors_headers_on_media_endpoint(): void
|
||||
{
|
||||
$response = $this->call(
|
||||
'OPTIONS',
|
||||
|
@ -27,7 +27,7 @@ class CorsHeadersTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function checkForNoCorsHeaderOnNonMediaEndpointLinks(): void
|
||||
public function check_for_no_cors_header_on_non_media_endpoint_links(): void
|
||||
{
|
||||
$response = $this->get('/blog');
|
||||
$response->assertHeaderMissing('Access-Control-Allow-Origin');
|
||||
|
|
|
@ -19,7 +19,7 @@ class FeedsTest extends TestCase
|
|||
* Test the blog RSS feed.
|
||||
*/
|
||||
#[Test]
|
||||
public function blogRssFeedIsPresent(): void
|
||||
public function blog_rss_feed_is_present(): void
|
||||
{
|
||||
Article::factory()->count(3)->create();
|
||||
$response = $this->get('/blog/feed.rss');
|
||||
|
@ -31,7 +31,7 @@ class FeedsTest extends TestCase
|
|||
* Test the notes RSS feed.
|
||||
*/
|
||||
#[Test]
|
||||
public function notesRssFeedIsPresent(): void
|
||||
public function notes_rss_feed_is_present(): void
|
||||
{
|
||||
Note::factory()->count(3)->create();
|
||||
$response = $this->get('/notes/feed.rss');
|
||||
|
@ -43,7 +43,7 @@ class FeedsTest extends TestCase
|
|||
* Test the blog RSS feed.
|
||||
*/
|
||||
#[Test]
|
||||
public function blogAtomFeedIsPresent(): void
|
||||
public function blog_atom_feed_is_present(): void
|
||||
{
|
||||
Article::factory()->count(3)->create();
|
||||
$response = $this->get('/blog/feed.atom');
|
||||
|
@ -52,7 +52,7 @@ class FeedsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function blogJf2FeedIsPresent(): void
|
||||
public function blog_jf2_feed_is_present(): void
|
||||
{
|
||||
Article::factory()->count(3)->create();
|
||||
$response = $this->get('/blog/feed.jf2');
|
||||
|
@ -77,7 +77,7 @@ class FeedsTest extends TestCase
|
|||
* Test the notes RSS feed.
|
||||
*/
|
||||
#[Test]
|
||||
public function notesAtomFeedIsPresent(): void
|
||||
public function notes_atom_feed_is_present(): void
|
||||
{
|
||||
Note::factory()->count(3)->create();
|
||||
$response = $this->get('/notes/feed.atom');
|
||||
|
@ -89,7 +89,7 @@ class FeedsTest extends TestCase
|
|||
* Test the blog JSON feed.
|
||||
*/
|
||||
#[Test]
|
||||
public function blogJsonFeedIsPresent(): void
|
||||
public function blog_json_feed_is_present(): void
|
||||
{
|
||||
Article::factory()->count(3)->create();
|
||||
$response = $this->get('/blog/feed.json');
|
||||
|
@ -101,7 +101,7 @@ class FeedsTest extends TestCase
|
|||
* Test the notes JSON feed.
|
||||
*/
|
||||
#[Test]
|
||||
public function notesJsonFeedIsPresent(): void
|
||||
public function notes_json_feed_is_present(): void
|
||||
{
|
||||
Note::factory()->count(3)->create();
|
||||
$response = $this->get('/notes/feed.json');
|
||||
|
@ -110,7 +110,7 @@ class FeedsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function notesJf2FeedIsPresent(): void
|
||||
public function notes_jf2_feed_is_present(): void
|
||||
{
|
||||
Note::factory()->count(3)->create();
|
||||
$response = $this->get('/notes/feed.jf2');
|
||||
|
@ -136,7 +136,7 @@ class FeedsTest extends TestCase
|
|||
* and whichever one they have can’t be `null`.
|
||||
*/
|
||||
#[Test]
|
||||
public function jsonFeedsHaveRequiredAttributes(): void
|
||||
public function json_feeds_have_required_attributes(): void
|
||||
{
|
||||
Note::factory()->count(3)->create();
|
||||
$response = $this->get('/notes/feed.json');
|
||||
|
@ -156,7 +156,7 @@ class FeedsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function jsonNoteFeedLoadsPlaceDataWithoutLazyLoading(): void
|
||||
public function json_note_feed_loads_place_data_without_lazy_loading(): void
|
||||
{
|
||||
$place = Place::factory()->create();
|
||||
Note::factory()->create(['note' => null, 'place_id' => $place->id]);
|
||||
|
|
|
@ -15,7 +15,7 @@ class FrontPageTest extends TestCase
|
|||
use RefreshDatabase;
|
||||
|
||||
#[Test]
|
||||
public function frontPageLoadsAllContent(): void
|
||||
public function front_page_loads_all_content(): void
|
||||
{
|
||||
Note::factory()->create(['note' => 'Note 1']);
|
||||
Article::factory()->create(['title' => 'Article 1']);
|
||||
|
|
|
@ -10,7 +10,7 @@ use Tests\TestCase;
|
|||
class HeaderLinkTest extends TestCase
|
||||
{
|
||||
#[Test]
|
||||
public function itShouldSeeTheIndiewebRelatedLinkHeaders(): void
|
||||
public function it_should_see_the_indieweb_related_link_headers(): void
|
||||
{
|
||||
$response = $this->get('/');
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ class HorizonTest extends TestCase
|
|||
* Horizon has its own test suite, here we just test it has been installed successfully.
|
||||
*/
|
||||
#[Test]
|
||||
public function horizonIsInstalled(): void
|
||||
public function horizon_is_installed(): void
|
||||
{
|
||||
$user = User::factory()->create([
|
||||
'name' => 'jonny',
|
||||
|
|
|
@ -21,7 +21,7 @@ class IndieAuthTest extends TestCase
|
|||
use RefreshDatabase;
|
||||
|
||||
#[Test]
|
||||
public function itShouldReturnIndieAuthMetadata(): void
|
||||
public function it_should_return_indie_auth_metadata(): void
|
||||
{
|
||||
$response = $this->get('/.well-known/indieauth-server');
|
||||
|
||||
|
@ -37,7 +37,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldRequireAdminLoginToShowAuthoriseForm(): void
|
||||
public function it_should_require_admin_login_to_show_authorise_form(): void
|
||||
{
|
||||
$response = $this->get('/auth', [
|
||||
'response_type' => 'code',
|
||||
|
@ -59,7 +59,7 @@ class IndieAuthTest extends TestCase
|
|||
* same domain, later test will check the flow when they are different.
|
||||
*/
|
||||
#[Test]
|
||||
public function itShouldReturnApprovalViewWhenTheRequestIsValid(): void
|
||||
public function it_should_return_approval_view_when_the_request_is_valid(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$url = url()->query('/auth', [
|
||||
|
@ -80,7 +80,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldReturnErrorViewWhenResponeTypeIsWrong(): void
|
||||
public function it_should_return_error_view_when_respone_type_is_wrong(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$url = url()->query('/auth', [
|
||||
|
@ -102,7 +102,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldReturnErrorViewWhenResponeTypeIsMissing(): void
|
||||
public function it_should_return_error_view_when_respone_type_is_missing(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$url = url()->query('/auth', [
|
||||
|
@ -123,7 +123,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldReturnErrorViewWhenClientIdIsMissing(): void
|
||||
public function it_should_return_error_view_when_client_id_is_missing(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$url = url()->query('/auth', [
|
||||
|
@ -144,7 +144,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldReturnErrorViewWhenRedirectUriIsMissing(): void
|
||||
public function it_should_return_error_view_when_redirect_uri_is_missing(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$url = url()->query('/auth', [
|
||||
|
@ -165,7 +165,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldReturnErrorViewWhenStateIsMissing(): void
|
||||
public function it_should_return_error_view_when_state_is_missing(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$url = url()->query('/auth', [
|
||||
|
@ -186,7 +186,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldReturnErrorViewWhenCodeChallengeIsMissing(): void
|
||||
public function it_should_return_error_view_when_code_challenge_is_missing(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$url = url()->query('/auth', [
|
||||
|
@ -207,7 +207,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldReturnErrorViewWhenCodeChallengeMethodIsMissing(): void
|
||||
public function it_should_return_error_view_when_code_challenge_method_is_missing(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$url = url()->query('/auth', [
|
||||
|
@ -228,7 +228,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldReturnErrorViewWhenCodeChallengeMethodIsUnsupportedValue(): void
|
||||
public function it_should_return_error_view_when_code_challenge_method_is_unsupported_value(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$url = url()->query('/auth', [
|
||||
|
@ -250,7 +250,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldCheckClientIdForValidRedirect(): void
|
||||
public function it_should_check_client_id_for_valid_redirect(): void
|
||||
{
|
||||
// Mock Guzzle request for client_id
|
||||
$appPageHtml = <<<'HTML'
|
||||
|
@ -295,7 +295,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldErrorIfClientIdPageHasNoValidRedirect(): void
|
||||
public function it_should_error_if_client_id_page_has_no_valid_redirect(): void
|
||||
{
|
||||
// Mock Guzzle request for client_id
|
||||
$appPageHtml = <<<'HTML'
|
||||
|
@ -340,7 +340,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldRedirectToAppOnApproval(): void
|
||||
public function it_should_redirect_to_app_on_approval(): void
|
||||
{
|
||||
$user = User::factory()->make();
|
||||
$response = $this->actingAs($user)->post('/auth/confirm', [
|
||||
|
@ -373,7 +373,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldShowErrorResponseWhenApprovalRequestIsMissingGrantType(): void
|
||||
public function it_should_show_error_response_when_approval_request_is_missing_grant_type(): void
|
||||
{
|
||||
$response = $this->post('/auth', [
|
||||
'code' => '123456',
|
||||
|
@ -393,7 +393,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldShowErrorResponseWhenApprovalRequestIsMissingCode(): void
|
||||
public function it_should_show_error_response_when_approval_request_is_missing_code(): void
|
||||
{
|
||||
$response = $this->post('/auth', [
|
||||
'grant_type' => 'authorization_code',
|
||||
|
@ -413,7 +413,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldShowErrorResponseWhenApprovalRequestIsMissingClientId(): void
|
||||
public function it_should_show_error_response_when_approval_request_is_missing_client_id(): void
|
||||
{
|
||||
$response = $this->post('/auth', [
|
||||
'grant_type' => 'authorization_code',
|
||||
|
@ -433,7 +433,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldShowErrorResponseWhenApprovalRequestIsMissingRedirectUri(): void
|
||||
public function it_should_show_error_response_when_approval_request_is_missing_redirect_uri(): void
|
||||
{
|
||||
$response = $this->post('/auth', [
|
||||
'grant_type' => 'authorization_code',
|
||||
|
@ -453,7 +453,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldShowErrorResponseWhenApprovalRequestIsMissingCodeVerifier(): void
|
||||
public function it_should_show_error_response_when_approval_request_is_missing_code_verifier(): void
|
||||
{
|
||||
$response = $this->post('/auth', [
|
||||
'grant_type' => 'authorization_code',
|
||||
|
@ -473,7 +473,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldShowErrorResponseWhenApprovalRequestGrantTypeIsUnsupported(): void
|
||||
public function it_should_show_error_response_when_approval_request_grant_type_is_unsupported(): void
|
||||
{
|
||||
$response = $this->post('/auth', [
|
||||
'grant_type' => 'unsupported',
|
||||
|
@ -494,7 +494,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldReturnErrorForUnknownCode(): void
|
||||
public function it_should_return_error_for_unknown_code(): void
|
||||
{
|
||||
$response = $this->post('/auth', [
|
||||
'grant_type' => 'authorization_code',
|
||||
|
@ -515,7 +515,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldReturnErrorForInvalidCode(): void
|
||||
public function it_should_return_error_for_invalid_code(): void
|
||||
{
|
||||
Cache::shouldReceive('pull')
|
||||
->once()
|
||||
|
@ -541,7 +541,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldReturnErrorForInvalidCodeVerifier(): void
|
||||
public function it_should_return_error_for_invalid_code_verifier(): void
|
||||
{
|
||||
Cache::shouldReceive('pull')
|
||||
->once()
|
||||
|
@ -570,7 +570,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldReturnMeDataForValidRequest(): void
|
||||
public function it_should_return_me_data_for_valid_request(): void
|
||||
{
|
||||
Cache::shouldReceive('pull')
|
||||
->once()
|
||||
|
@ -600,7 +600,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldReturnErrorWhenNoScopesGivenToTokenEndpoint(): void
|
||||
public function it_should_return_error_when_no_scopes_given_to_token_endpoint(): void
|
||||
{
|
||||
Cache::shouldReceive('pull')
|
||||
->once()
|
||||
|
@ -635,7 +635,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldReturnErrorWhenClientIdDoesNotMatchDuringTokenRequest(): void
|
||||
public function it_should_return_error_when_client_id_does_not_match_during_token_request(): void
|
||||
{
|
||||
Cache::shouldReceive('pull')
|
||||
->once()
|
||||
|
@ -670,7 +670,7 @@ class IndieAuthTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function itShouldReturnAnAccessTokenIfValidationPasses(): void
|
||||
public function it_should_return_an_access_token_if_validation_passes(): void
|
||||
{
|
||||
Cache::shouldReceive('pull')
|
||||
->once()
|
||||
|
|
|
@ -24,14 +24,14 @@ class LikesTest extends TestCase
|
|||
use TestToken;
|
||||
|
||||
#[Test]
|
||||
public function likesPageHasCorrectView(): void
|
||||
public function likes_page_has_correct_view(): void
|
||||
{
|
||||
$response = $this->get('/likes');
|
||||
$response->assertViewIs('likes.index');
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function singleLikePageHasCorrectView(): void
|
||||
public function single_like_page_has_correct_view(): void
|
||||
{
|
||||
$like = Like::factory()->create();
|
||||
$response = $this->get('/likes/' . $like->id);
|
||||
|
@ -39,7 +39,7 @@ class LikesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function checkLikeCreatedFromMicropubApiRequests(): void
|
||||
public function check_like_created_from_micropub_api_requests(): void
|
||||
{
|
||||
Queue::fake();
|
||||
|
||||
|
@ -59,7 +59,7 @@ class LikesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function checkLikeCreatedFromMicropubWebRequests(): void
|
||||
public function check_like_created_from_micropub_web_requests(): void
|
||||
{
|
||||
Queue::fake();
|
||||
|
||||
|
@ -77,7 +77,7 @@ class LikesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function likeWithSimpleAuthor(): void
|
||||
public function like_with_simple_author(): void
|
||||
{
|
||||
$like = new Like;
|
||||
$like->url = 'http://example.org/note/id';
|
||||
|
@ -116,7 +116,7 @@ class LikesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function likeWithHCard(): void
|
||||
public function like_with_h_card(): void
|
||||
{
|
||||
$like = new Like;
|
||||
$like->url = 'http://example.org/note/id';
|
||||
|
@ -159,7 +159,7 @@ class LikesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function likeWithoutMicroformats(): void
|
||||
public function like_without_microformats(): void
|
||||
{
|
||||
$like = new Like;
|
||||
$like->url = 'http://example.org/note/id';
|
||||
|
@ -195,7 +195,7 @@ class LikesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function likeThatIsATweet(): void
|
||||
public function like_that_is_a_tweet(): void
|
||||
{
|
||||
$like = new Like;
|
||||
$like->url = 'https://twitter.com/jonnybarnes/status/1050823255123251200';
|
||||
|
@ -234,7 +234,7 @@ class LikesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function noErrorForFailureToPosseWithBridgy(): void
|
||||
public function no_error_for_failure_to_posse_with_bridgy(): void
|
||||
{
|
||||
$like = new Like;
|
||||
$like->url = 'https://twitter.com/jonnybarnes/status/1050823255123251200';
|
||||
|
@ -271,7 +271,7 @@ class LikesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function unknownLikeGivesNotFoundResponse(): void
|
||||
public function unknown_like_gives_not_found_response(): void
|
||||
{
|
||||
$response = $this->get('/likes/202');
|
||||
$response->assertNotFound();
|
||||
|
|
|
@ -25,7 +25,7 @@ class MicropubControllerTest extends TestCase
|
|||
use TestToken;
|
||||
|
||||
#[Test]
|
||||
public function micropubGetRequestWithoutTokenReturnsErrorResponse(): void
|
||||
public function micropub_get_request_without_token_returns_error_response(): void
|
||||
{
|
||||
$response = $this->get('/api/post');
|
||||
$response->assertStatus(401);
|
||||
|
@ -33,7 +33,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubGetRequestWithoutValidTokenReturnsErrorResponse(): void
|
||||
public function micropub_get_request_without_valid_token_returns_error_response(): void
|
||||
{
|
||||
$response = $this->get('/api/post', ['HTTP_Authorization' => 'Bearer abc123']);
|
||||
$response->assertStatus(400);
|
||||
|
@ -45,7 +45,7 @@ class MicropubControllerTest extends TestCase
|
|||
* 200 response. Check token information is also returned in the response.
|
||||
*/
|
||||
#[Test]
|
||||
public function micropubGetRequestWithValidTokenReturnsOkResponse(): void
|
||||
public function micropub_get_request_with_valid_token_returns_ok_response(): void
|
||||
{
|
||||
$response = $this->get('/api/post', ['HTTP_Authorization' => 'Bearer ' . $this->getToken()]);
|
||||
$response->assertStatus(200);
|
||||
|
@ -53,14 +53,14 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientsCanRequestSyndicationTargetsCanBeEmpty(): void
|
||||
public function micropub_clients_can_request_syndication_targets_can_be_empty(): void
|
||||
{
|
||||
$response = $this->get('/api/post?q=syndicate-to', ['HTTP_Authorization' => 'Bearer ' . $this->getToken()]);
|
||||
$response->assertJsonFragment(['syndicate-to' => []]);
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientsCanRequestSyndicationTargetsPopulatesFromModel(): void
|
||||
public function micropub_clients_can_request_syndication_targets_populates_from_model(): void
|
||||
{
|
||||
$syndicationTarget = SyndicationTarget::factory()->create();
|
||||
$response = $this->get('/api/post?q=syndicate-to', ['HTTP_Authorization' => 'Bearer ' . $this->getToken()]);
|
||||
|
@ -68,7 +68,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientsCanRequestKnownNearbyPlaces(): void
|
||||
public function micropub_clients_can_request_known_nearby_places(): void
|
||||
{
|
||||
Place::factory()->create([
|
||||
'name' => 'The Bridgewater Pub',
|
||||
|
@ -88,21 +88,21 @@ class MicropubControllerTest extends TestCase
|
|||
$response->assertJson(['places' => [['slug' => 'the-bridgewater-pub']]]);
|
||||
}*/
|
||||
#[Test]
|
||||
public function returnEmptyResultWhenMicropubClientRequestsKnownNearbyPlaces(): void
|
||||
public function return_empty_result_when_micropub_client_requests_known_nearby_places(): void
|
||||
{
|
||||
$response = $this->get('/api/post?q=geo:1.23,4.56', ['HTTP_Authorization' => 'Bearer ' . $this->getToken()]);
|
||||
$response->assertJson(['places' => []]);
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientCanRequestEndpointConfig(): void
|
||||
public function micropub_client_can_request_endpoint_config(): void
|
||||
{
|
||||
$response = $this->get('/api/post?q=config', ['HTTP_Authorization' => 'Bearer ' . $this->getToken()]);
|
||||
$response->assertJsonFragment(['media-endpoint' => route('media-endpoint')]);
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientCanCreateNewNote(): void
|
||||
public function micropub_client_can_create_new_note(): void
|
||||
{
|
||||
$faker = Factory::create();
|
||||
$note = $faker->text;
|
||||
|
@ -121,7 +121,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientCanRequestTheNewNoteIsSyndicatedToMastodonAndBluesky(): void
|
||||
public function micropub_client_can_request_the_new_note_is_syndicated_to_mastodon_and_bluesky(): void
|
||||
{
|
||||
Queue::fake();
|
||||
|
||||
|
@ -155,7 +155,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientsCanCreateNewPlaces(): void
|
||||
public function micropub_clients_can_create_new_places(): void
|
||||
{
|
||||
$response = $this->post(
|
||||
'/api/post',
|
||||
|
@ -171,7 +171,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientsCanCreateNewPlacesWithOldLocationSyntax(): void
|
||||
public function micropub_clients_can_create_new_places_with_old_location_syntax(): void
|
||||
{
|
||||
$response = $this->post(
|
||||
'/api/post',
|
||||
|
@ -188,7 +188,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientWebRequestWithInvalidTokenReturnsErrorResponse(): void
|
||||
public function micropub_client_web_request_with_invalid_token_returns_error_response(): void
|
||||
{
|
||||
$response = $this->post(
|
||||
'/api/post',
|
||||
|
@ -203,7 +203,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientWebRequestWithTokenWithoutAnyScopesReturnsErrorResponse(): void
|
||||
public function micropub_client_web_request_with_token_without_any_scopes_returns_error_response(): void
|
||||
{
|
||||
$response = $this->post(
|
||||
'/api/post',
|
||||
|
@ -218,7 +218,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientWebRequestWithTokenWithoutCreateScopesReturnsErrorResponse(): void
|
||||
public function micropub_client_web_request_with_token_without_create_scopes_returns_error_response(): void
|
||||
{
|
||||
$response = $this->post(
|
||||
'/api/post',
|
||||
|
@ -237,7 +237,7 @@ class MicropubControllerTest extends TestCase
|
|||
* Test a valid micropub requests using JSON syntax creates a new note.
|
||||
*/
|
||||
#[Test]
|
||||
public function micropubClientApiRequestCreatesNewNote(): void
|
||||
public function micropub_client_api_request_creates_new_note(): void
|
||||
{
|
||||
Queue::fake();
|
||||
Media::create([
|
||||
|
@ -284,7 +284,7 @@ class MicropubControllerTest extends TestCase
|
|||
* existing self-created place.
|
||||
*/
|
||||
#[Test]
|
||||
public function micropubClientApiRequestCreatesNewNoteWithExistingPlaceInLocationData(): void
|
||||
public function micropub_client_api_request_creates_new_note_with_existing_place_in_location_data(): void
|
||||
{
|
||||
$place = new Place;
|
||||
$place->name = 'Test Place';
|
||||
|
@ -314,7 +314,7 @@ class MicropubControllerTest extends TestCase
|
|||
* a new place defined in the location block.
|
||||
*/
|
||||
#[Test]
|
||||
public function micropubClientApiRequestCreatesNewNoteWithNewPlaceInLocationData(): void
|
||||
public function micropub_client_api_request_creates_new_note_with_new_place_in_location_data(): void
|
||||
{
|
||||
$faker = Factory::create();
|
||||
$note = $faker->text;
|
||||
|
@ -349,7 +349,7 @@ class MicropubControllerTest extends TestCase
|
|||
* a new place defined in the location block if there is missing data.
|
||||
*/
|
||||
#[Test]
|
||||
public function micropubClientApiRequestCreatesNewNoteWithoutNewPlaceInLocationData(): void
|
||||
public function micropub_client_api_request_creates_new_note_without_new_place_in_location_data(): void
|
||||
{
|
||||
$faker = Factory::create();
|
||||
$note = $faker->text;
|
||||
|
@ -382,7 +382,7 @@ class MicropubControllerTest extends TestCase
|
|||
* error. Also check the message.
|
||||
*/
|
||||
#[Test]
|
||||
public function micropubClientApiRequestWithoutTokenReturnsError(): void
|
||||
public function micropub_client_api_request_without_token_returns_error(): void
|
||||
{
|
||||
$faker = Factory::create();
|
||||
$note = $faker->text;
|
||||
|
@ -408,7 +408,7 @@ class MicropubControllerTest extends TestCase
|
|||
* an error. Also check the message.
|
||||
*/
|
||||
#[Test]
|
||||
public function micropubClientApiRequestWithTokenWithInsufficientPermissionReturnsError(): void
|
||||
public function micropub_client_api_request_with_token_with_insufficient_permission_returns_error(): void
|
||||
{
|
||||
$faker = Factory::create();
|
||||
$note = $faker->text;
|
||||
|
@ -431,7 +431,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientApiRequestForUnsupportedPostTypeReturnsError(): void
|
||||
public function micropub_client_api_request_for_unsupported_post_type_returns_error(): void
|
||||
{
|
||||
$response = $this->postJson(
|
||||
'/api/post',
|
||||
|
@ -452,7 +452,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientApiRequestCreatesNewPlace(): void
|
||||
public function micropub_client_api_request_creates_new_place(): void
|
||||
{
|
||||
$faker = Factory::create();
|
||||
$response = $this->postJson(
|
||||
|
@ -472,7 +472,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientApiRequestCreatesNewPlaceWithUncertaintyParameter(): void
|
||||
public function micropub_client_api_request_creates_new_place_with_uncertainty_parameter(): void
|
||||
{
|
||||
$faker = Factory::create();
|
||||
$response = $this->postJson(
|
||||
|
@ -492,7 +492,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientApiRequestUpdatesExistingNote(): void
|
||||
public function micropub_client_api_request_updates_existing_note(): void
|
||||
{
|
||||
$note = Note::factory()->create();
|
||||
$response = $this->postJson(
|
||||
|
@ -512,7 +512,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientApiRequestUpdatesNoteSyndicationLinks(): void
|
||||
public function micropub_client_api_request_updates_note_syndication_links(): void
|
||||
{
|
||||
$note = Note::factory()->create();
|
||||
$response = $this->postJson(
|
||||
|
@ -539,7 +539,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientApiRequestAddsImageToNote(): void
|
||||
public function micropub_client_api_request_adds_image_to_note(): void
|
||||
{
|
||||
$note = Note::factory()->create();
|
||||
$response = $this->postJson(
|
||||
|
@ -562,7 +562,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientApiRequestReturnsErrorTryingToUpdateNonNoteModel(): void
|
||||
public function micropub_client_api_request_returns_error_trying_to_update_non_note_model(): void
|
||||
{
|
||||
$response = $this->postJson(
|
||||
'/api/post',
|
||||
|
@ -581,7 +581,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientApiRequestReturnsErrorTryingToUpdateNonExistingNote(): void
|
||||
public function micropub_client_api_request_returns_error_trying_to_update_non_existing_note(): void
|
||||
{
|
||||
$response = $this->postJson(
|
||||
'/api/post',
|
||||
|
@ -600,7 +600,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientApiRequestReturnsErrorWhenTryingToUpdateUnsupportedProperty(): void
|
||||
public function micropub_client_api_request_returns_error_when_trying_to_update_unsupported_property(): void
|
||||
{
|
||||
$note = Note::factory()->create();
|
||||
$response = $this->postJson(
|
||||
|
@ -620,7 +620,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientApiRequestWithTokenWithInsufficientScopeReturnsError(): void
|
||||
public function micropub_client_api_request_with_token_with_insufficient_scope_returns_error(): void
|
||||
{
|
||||
$response = $this->postJson(
|
||||
'/api/post',
|
||||
|
@ -639,7 +639,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientApiRequestCanReplaceNoteSyndicationTargets(): void
|
||||
public function micropub_client_api_request_can_replace_note_syndication_targets(): void
|
||||
{
|
||||
$note = Note::factory()->create();
|
||||
$response = $this->postJson(
|
||||
|
@ -666,7 +666,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientWebRequestCanEncodeTokenWithinTheForm(): void
|
||||
public function micropub_client_web_request_can_encode_token_within_the_form(): void
|
||||
{
|
||||
$faker = Factory::create();
|
||||
$note = $faker->text;
|
||||
|
@ -684,7 +684,7 @@ class MicropubControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function micropubClientApiRequestCreatesArticlesWhenItIncludesTheNameProperty(): void
|
||||
public function micropub_client_api_request_creates_articles_when_it_includes_the_name_property(): void
|
||||
{
|
||||
$faker = Factory::create();
|
||||
$name = $faker->text(50);
|
||||
|
|
|
@ -21,7 +21,7 @@ class MicropubMediaTest extends TestCase
|
|||
use TestToken;
|
||||
|
||||
#[Test]
|
||||
public function emptyResponseForLastUploadWhenNoneFound(): void
|
||||
public function empty_response_for_last_upload_when_none_found(): void
|
||||
{
|
||||
// Make sure there’s no media
|
||||
$this->assertCount(0, Media::all());
|
||||
|
@ -35,7 +35,7 @@ class MicropubMediaTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function getRequestWithInvalidTokenReturnsErrorResponse(): void
|
||||
public function get_request_with_invalid_token_returns_error_response(): void
|
||||
{
|
||||
$response = $this->get(
|
||||
'/api/media?q=last',
|
||||
|
@ -46,7 +46,7 @@ class MicropubMediaTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function getRequestWithTokenWithoutScopeReturnsErrorResponse(): void
|
||||
public function get_request_with_token_without_scope_returns_error_response(): void
|
||||
{
|
||||
$response = $this->get(
|
||||
'/api/media?q=last',
|
||||
|
@ -57,7 +57,7 @@ class MicropubMediaTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function getRequestWithTokenWithInsufficientScopeReturnsErrorResponse(): void
|
||||
public function get_request_with_token_with_insufficient_scope_returns_error_response(): void
|
||||
{
|
||||
$response = $this->get(
|
||||
'/api/media?q=last',
|
||||
|
@ -68,7 +68,7 @@ class MicropubMediaTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function emptyGetRequestWithTokenReceivesOkResponse(): void
|
||||
public function empty_get_request_with_token_receives_ok_response(): void
|
||||
{
|
||||
$response = $this->get(
|
||||
'/api/media',
|
||||
|
@ -79,7 +79,7 @@ class MicropubMediaTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function clientCanListLastUpload(): void
|
||||
public function client_can_list_last_upload(): void
|
||||
{
|
||||
Queue::fake();
|
||||
$file = __DIR__ . '/../aaron.png';
|
||||
|
@ -108,7 +108,7 @@ class MicropubMediaTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function clientCanSourceUploads(): void
|
||||
public function client_can_source_uploads(): void
|
||||
{
|
||||
Queue::fake();
|
||||
$file = __DIR__ . '/../aaron.png';
|
||||
|
@ -140,7 +140,7 @@ class MicropubMediaTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function clientCanSourceUploadsWithLimit(): void
|
||||
public function client_can_source_uploads_with_limit(): void
|
||||
{
|
||||
Queue::fake();
|
||||
$file = __DIR__ . '/../aaron.png';
|
||||
|
@ -174,7 +174,7 @@ class MicropubMediaTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function mediaEndpointUploadRequiresFile(): void
|
||||
public function media_endpoint_upload_requires_file(): void
|
||||
{
|
||||
$response = $this->post(
|
||||
'/api/media',
|
||||
|
@ -190,7 +190,7 @@ class MicropubMediaTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function errorResponseForUnknownQValue(): void
|
||||
public function error_response_for_unknown_q_value(): void
|
||||
{
|
||||
$response = $this->get(
|
||||
'/api/media?q=unknown',
|
||||
|
@ -201,7 +201,7 @@ class MicropubMediaTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function optionsRequestReturnsCorsResponse(): void
|
||||
public function options_request_returns_cors_response(): void
|
||||
{
|
||||
$response = $this->options('/api/media');
|
||||
|
||||
|
@ -210,7 +210,7 @@ class MicropubMediaTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function mediaEndpointRequestWithInvalidTokenReturns400Response(): void
|
||||
public function media_endpoint_request_with_invalid_token_returns400_response(): void
|
||||
{
|
||||
$response = $this->post(
|
||||
'/api/media',
|
||||
|
@ -222,7 +222,7 @@ class MicropubMediaTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function mediaEndpointRequestWithTokenWithNoScopeReturns400Response(): void
|
||||
public function media_endpoint_request_with_token_with_no_scope_returns400_response(): void
|
||||
{
|
||||
$response = $this->post(
|
||||
'/api/media',
|
||||
|
@ -234,7 +234,7 @@ class MicropubMediaTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function mediaEndpointRequestWithInsufficientTokenScopesReturns401Response(): void
|
||||
public function media_endpoint_request_with_insufficient_token_scopes_returns401_response(): void
|
||||
{
|
||||
$response = $this->post(
|
||||
'/api/media',
|
||||
|
@ -248,7 +248,7 @@ class MicropubMediaTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function mediaEndpointUploadFile(): void
|
||||
public function media_endpoint_upload_file(): void
|
||||
{
|
||||
Queue::fake();
|
||||
$file = __DIR__ . '/../aaron.png';
|
||||
|
@ -271,7 +271,7 @@ class MicropubMediaTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function mediaEndpointUploadAudioFile(): void
|
||||
public function media_endpoint_upload_audio_file(): void
|
||||
{
|
||||
Queue::fake();
|
||||
$file = __DIR__ . '/../audio.mp3';
|
||||
|
@ -294,7 +294,7 @@ class MicropubMediaTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function mediaEndpointUploadVideoFile(): void
|
||||
public function media_endpoint_upload_video_file(): void
|
||||
{
|
||||
Queue::fake();
|
||||
$file = __DIR__ . '/../video.ogv';
|
||||
|
@ -317,7 +317,7 @@ class MicropubMediaTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function mediaEndpointUploadDocumentFile(): void
|
||||
public function media_endpoint_upload_document_file(): void
|
||||
{
|
||||
Queue::fake();
|
||||
|
||||
|
@ -339,7 +339,7 @@ class MicropubMediaTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function mediaEndpointUploadInvalidFileReturnsError(): void
|
||||
public function media_endpoint_upload_invalid_file_returns_error(): void
|
||||
{
|
||||
Queue::fake();
|
||||
Storage::fake('local');
|
||||
|
|
|
@ -18,7 +18,7 @@ class NotesControllerTest extends TestCase
|
|||
* mean the database is being hit.
|
||||
*/
|
||||
#[Test]
|
||||
public function notesPageLoads(): void
|
||||
public function notes_page_loads(): void
|
||||
{
|
||||
$response = $this->get('/notes');
|
||||
$response->assertStatus(200);
|
||||
|
@ -28,7 +28,7 @@ class NotesControllerTest extends TestCase
|
|||
* Test a specific note.
|
||||
*/
|
||||
#[Test]
|
||||
public function specificNotePageLoads(): void
|
||||
public function specific_note_page_loads(): void
|
||||
{
|
||||
$note = Note::factory()->create();
|
||||
$response = $this->get($note->uri);
|
||||
|
@ -47,7 +47,7 @@ class NotesControllerTest extends TestCase
|
|||
* Test that `/note/{decID}` redirects to `/notes/{nb60id}`.
|
||||
*/
|
||||
#[Test]
|
||||
public function oldNoteUrlsRedirect(): void
|
||||
public function old_note_urls_redirect(): void
|
||||
{
|
||||
$note = Note::factory()->create();
|
||||
$response = $this->get('/note/' . $note->id);
|
||||
|
@ -58,21 +58,21 @@ class NotesControllerTest extends TestCase
|
|||
* Visit the tagged page and check the tag view data.
|
||||
*/
|
||||
#[Test]
|
||||
public function taggedNotesPageLoads(): void
|
||||
public function tagged_notes_page_loads(): void
|
||||
{
|
||||
$response = $this->get('/notes/tagged/beer');
|
||||
$response->assertViewHas('tag', 'beer');
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function unknownNoteGives404(): void
|
||||
public function unknown_note_gives404(): void
|
||||
{
|
||||
$response = $this->get('/notes/112233');
|
||||
$response->assertNotFound();
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function checkNoteIdNotOutOfRange(): void
|
||||
public function check_note_id_not_out_of_range(): void
|
||||
{
|
||||
$response = $this->get('/notes/photou-photologo');
|
||||
$response->assertNotFound();
|
||||
|
|
|
@ -16,7 +16,7 @@ class OwnYourGramTest extends TestCase
|
|||
use TestToken;
|
||||
|
||||
#[Test]
|
||||
public function postingInstagramUrlSavesMediaPath(): void
|
||||
public function posting_instagram_url_saves_media_path(): void
|
||||
{
|
||||
$response = $this->json(
|
||||
'POST',
|
||||
|
|
|
@ -27,7 +27,7 @@ class ParseCachedWebMentionsTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function parseWebmentionHtml(): void
|
||||
public function parse_webmention_html(): void
|
||||
{
|
||||
$webmentionAaron = WebMention::factory()->create([
|
||||
'source' => 'https://aaronpk.localhost/reply/1',
|
||||
|
|
|
@ -17,7 +17,7 @@ class PlacesTest extends TestCase
|
|||
* Test the `/places` page for OK response.
|
||||
*/
|
||||
#[Test]
|
||||
public function placesPageLoads(): void
|
||||
public function places_page_loads(): void
|
||||
{
|
||||
$response = $this->get('/places');
|
||||
$response->assertStatus(200);
|
||||
|
@ -27,7 +27,7 @@ class PlacesTest extends TestCase
|
|||
* Test a specific place.
|
||||
*/
|
||||
#[Test]
|
||||
public function singlePlacePageLoads(): void
|
||||
public function single_place_page_loads(): void
|
||||
{
|
||||
$place = Place::factory()->create();
|
||||
$response = $this->get($place->uri);
|
||||
|
@ -35,7 +35,7 @@ class PlacesTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function unknownPlaceGives404()
|
||||
public function unknown_place_gives404()
|
||||
{
|
||||
$response = $this->get('/places/unknown');
|
||||
$response->assertNotFound();
|
||||
|
|
|
@ -17,7 +17,7 @@ class ReDownloadWebMentionsTest extends TestCase
|
|||
use RefreshDatabase;
|
||||
|
||||
#[Test]
|
||||
public function downloadJobGetsQueued(): void
|
||||
public function download_job_gets_queued(): void
|
||||
{
|
||||
Queue::fake();
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ use Tests\TestCase;
|
|||
class SearchTest extends TestCase
|
||||
{
|
||||
#[Test]
|
||||
public function searchEndpointReturnsResults(): void
|
||||
public function search_endpoint_returns_results(): void
|
||||
{
|
||||
Note::factory(10)->create();
|
||||
Note::Factory()->create(['note' => 'hello world']);
|
||||
|
|
|
@ -21,7 +21,7 @@ class SwarmTest extends TestCase
|
|||
* Given a check in to Foursquare, this is the content Ownyourswarm will post to us.
|
||||
*/
|
||||
#[Test]
|
||||
public function mockedOwnyourswarmRequestWithFoursquare(): void
|
||||
public function mocked_ownyourswarm_request_with_foursquare(): void
|
||||
{
|
||||
Queue::fake();
|
||||
|
||||
|
@ -68,7 +68,7 @@ class SwarmTest extends TestCase
|
|||
* OpenStreetMap data.
|
||||
*/
|
||||
#[Test]
|
||||
public function mockedOwnyourswarmRequestWithOsm(): void
|
||||
public function mocked_ownyourswarm_request_with_osm(): void
|
||||
{
|
||||
Queue::fake();
|
||||
|
||||
|
@ -110,7 +110,7 @@ class SwarmTest extends TestCase
|
|||
* This request would actually come from another client than OwnYourSwarm, as that would include a Foursquare URL
|
||||
*/
|
||||
#[Test]
|
||||
public function mockedOwnyourswarmRequestWithoutKnownExternalUrl(): void
|
||||
public function mocked_ownyourswarm_request_without_known_external_url(): void
|
||||
{
|
||||
Queue::fake();
|
||||
|
||||
|
@ -149,7 +149,7 @@ class SwarmTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function mockedOwnyourswarmRequestWithNoTextContent(): void
|
||||
public function mocked_ownyourswarm_request_with_no_text_content(): void
|
||||
{
|
||||
$response = $this->json(
|
||||
'POST',
|
||||
|
@ -186,7 +186,7 @@ class SwarmTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function mockedOwnyourswarmRequestSavesJustThePostWhenAnErrorOccursInTheCheckinData(): void
|
||||
public function mocked_ownyourswarm_request_saves_just_the_post_when_an_error_occurs_in_the_checkin_data(): void
|
||||
{
|
||||
Queue::fake();
|
||||
|
||||
|
@ -224,7 +224,7 @@ class SwarmTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function mockedOwnyourswarmRequestWithHAdrLocation(): void
|
||||
public function mocked_ownyourswarm_request_with_h_adr_location(): void
|
||||
{
|
||||
Queue::fake();
|
||||
|
||||
|
@ -270,7 +270,7 @@ class SwarmTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function ownyourswarmCheckinTestUsingRealData(): void
|
||||
public function ownyourswarm_checkin_test_using_real_data(): void
|
||||
{
|
||||
$response = $this->json(
|
||||
'POST',
|
||||
|
|
|
@ -19,7 +19,7 @@ class TokenServiceTest extends TestCase
|
|||
* the APP_KEY, to test, we shall create a token, and then verify it.
|
||||
*/
|
||||
#[Test]
|
||||
public function tokenserviceCreatesAndValidatesTokens(): void
|
||||
public function tokenservice_creates_and_validates_tokens(): void
|
||||
{
|
||||
$tokenService = new TokenService;
|
||||
$data = [
|
||||
|
@ -38,7 +38,7 @@ class TokenServiceTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function tokensWithDifferentSigningKeyThrowsException(): void
|
||||
public function tokens_with_different_signing_key_throws_exception(): void
|
||||
{
|
||||
$this->expectException(RequiredConstraintsViolated::class);
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ class WebMentionsControllerTest extends TestCase
|
|||
use RefreshDatabase;
|
||||
|
||||
#[Test]
|
||||
public function webmentionEndpointCanServeBrowserRequest(): void
|
||||
public function webmention_endpoint_can_serve_browser_request(): void
|
||||
{
|
||||
$response = $this->get('/webmention');
|
||||
$response->assertViewIs('webmention-endpoint');
|
||||
|
@ -26,7 +26,7 @@ class WebMentionsControllerTest extends TestCase
|
|||
* Test webmentions without source and target are rejected.
|
||||
*/
|
||||
#[Test]
|
||||
public function webmentionsWithoutSourceAndTargetAreRejected(): void
|
||||
public function webmentions_without_source_and_target_are_rejected(): void
|
||||
{
|
||||
$response = $this->call('POST', '/webmention', ['source' => 'https://example.org/post/123']);
|
||||
$response->assertStatus(400);
|
||||
|
@ -38,7 +38,7 @@ class WebMentionsControllerTest extends TestCase
|
|||
* In this case an invalid target is a URL that doesn’t exist on our domain.
|
||||
*/
|
||||
#[Test]
|
||||
public function invalidTargetReturnsErrorResponse(): void
|
||||
public function invalid_target_returns_error_response(): void
|
||||
{
|
||||
$response = $this->call('POST', '/webmention', [
|
||||
'source' => 'https://example.org/post/123',
|
||||
|
@ -51,7 +51,7 @@ class WebMentionsControllerTest extends TestCase
|
|||
* Test blog target gets a 501 response due to our not supporting it.
|
||||
*/
|
||||
#[Test]
|
||||
public function blogTargetReturns501Response(): void
|
||||
public function blog_target_returns501_response(): void
|
||||
{
|
||||
$response = $this->call('POST', '/webmention', [
|
||||
'source' => 'https://example.org/post/123',
|
||||
|
@ -64,7 +64,7 @@ class WebMentionsControllerTest extends TestCase
|
|||
* Test that a non-existent note gives a 400 response.
|
||||
*/
|
||||
#[Test]
|
||||
public function nonexistentNoteReturnsErrorResponse(): void
|
||||
public function nonexistent_note_returns_error_response(): void
|
||||
{
|
||||
$response = $this->call('POST', '/webmention', [
|
||||
'source' => 'https://example.org/post/123',
|
||||
|
@ -74,7 +74,7 @@ class WebMentionsControllerTest extends TestCase
|
|||
}
|
||||
|
||||
#[Test]
|
||||
public function legitimateWebmentionTriggersProcessWebmentionJob(): void
|
||||
public function legitimate_webmention_triggers_process_webmention_job(): void
|
||||
{
|
||||
Queue::fake();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue