Skip to content

Test method naming convention #28

@chris-ruskai

Description

@chris-ruskai

Currently:

Camel case prefixed with test. testGuestCannotSeeArticle()

Proposed:

Descriptive names delimited by underscore

Example:

<?php

    /** @test **/
   public function guests_cannot_see_article(){
       //Do Something.
   }

?>

Reasoning:

Laravel's own tutorials don't even follow the camel case standard.
https://laracasts.com/series/lets-build-a-forum-with-laravel/episodes/2
https://laracasts.com/series/phpunit-testing-in-laravel/episodes/2 (This one describes both but shows why underscored version is preferred in Laravel)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions