Make WordPress Core

Ticket #37405: 37405.patch

File 37405.patch, 593 bytes (added by johnbillion, 9 years ago)
  • tests/phpunit/tests/user/capabilities.php

     
    11831183
    11841184        }
    11851185
     1186        public function testNonLoggedInUsersHaveNoCapabilities() {
     1187
     1188                $this->assertFalse( is_user_logged_in() );
     1189
     1190                $caps = $this->getCapsAndRoles();
     1191
     1192                foreach ( $caps as $cap => $roles ) {
     1193                        $this->assertFalse( current_user_can( $cap ), "Non-logged-in user should not have the {$cap} capability" );
     1194                }               
     1195
     1196        }
     1197
    11861198}