Make WordPress Core


Ignore:
Timestamp:
06/30/2020 12:41:30 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve documentation for Ajax comment tests per the documentation standards.

See #49572.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/ajax/DimComment.php

    r47198 r48220  
    1717
    1818        /**
    19          * List of comments
     19         * List of comments.
    2020         *
    2121         * @var array
    … …  
    2424
    2525        /**
    26          * Set up the test fixture
     26         * Sets up the test fixture.
    2727         */
    2828        public function setUp() {
    … …  
    3434
    3535        /**
    36          * Clear the POST actions in between requests
     36         * Clears the POST actions in between requests.
    3737         */
    3838        protected function _clear_post_action() {
    … …  
    4747
    4848        /**
    49          * Test as a privilged user (administrator)
    50          * Expects test to pass
    51          *
    52          * @param mixed $comment Comment object
    53          * @return void
     49         * Tests as a privileged user (administrator).
     50         *
     51         * Expects test to pass.
     52         *
     53         * @param WP_Comment $comment Comment object.
    5454         */
    5555        public function _test_as_admin( $comment ) {
    … …  
    108108
    109109        /**
    110          * Test as a non-privileged user (subscriber)
    111          * Expects test to fail
    112          *
    113          * @param mixed $comment Comment object
    114          * @return void
     110         * Tests as a non-privileged user (subscriber).
     111         *
     112         * Expects test to fail.
     113         *
     114         * @param WP_Comment $comment Comment object.
    115115         */
    116116        public function _test_as_subscriber( $comment ) {
    … …  
    136136
    137137        /**
    138          * Test with a bad nonce
    139          * Expects test to fail
    140          *
    141          * @param mixed $comment Comment object
    142          * @return void
     138         * Tests with a bad nonce.
     139         *
     140         * Expects test to fail.
     141         *
     142         * @param WP_Comment $comment Comment object.
    143143         */
    144144        public function _test_with_bad_nonce( $comment ) {
    … …  
    164164
    165165        /**
    166          * Test with a bad id
    167          * Expects test to fail
    168          *
    169          * @return void
     166         * Tests with a bad ID.
     167         *
     168         * Expects test to fail.
    170169         */
    171170        public function test_with_bad_id() {
    … …  
    205204
    206205        /**
    207          * Dim a comment as an administrator (expects success)
    208          *
    209          * @return void
     206         * Dims a comment as an administrator (expects success).
    210207         */
    211208        public function test_ajax_comment_dim_actions_as_administrator() {
    … …  
    216213
    217214        /**
    218          * Dim a comment as a subscriber (expects permission denied)
    219          *
    220          * @return void
     215         * Dims a comment as a subscriber (expects permission denied).
    221216         */
    222217        public function test_ajax_comment_dim_actions_as_subscriber() {
    … …  
    226221
    227222        /**
    228          * Dim a comment with no id
    229          *
    230          * @return void
     223         * Dims a comment with no ID.
    231224         */
    232225        public function test_ajax_dim_comment_no_id() {
    … …  
    236229
    237230        /**
    238          * Dim a comment with a bad nonce
    239          *
    240          * @return void
     231         * Dims a comment with a bad nonce.
    241232         */
    242233        public function test_ajax_dim_comment_bad_nonce() {
Note: See TracChangeset for help on using the changeset viewer.