WordPress.org

Make WordPress Core

Changeset 49835


Ignore:
Timestamp:
12/18/2020 02:38:28 PM (12 months ago)
Author:
desrosj
Message:

Build/Test Tools: Run the Ajax test group for multisite.

This will help catch issues with Ajax related functionality on multisite.

A few tests have also been marked as skipWithMultisite() as they require network admin level capabilities when performing the same operations on a multisite install.

Props garrett-eclipse, netweb.
Fixes #46567.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/phpunit-tests.yml

    r49786 r49835  
    258258        run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml
    259259
     260      - name: Run AJAX tests as a multisite install
     261        run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml --group ajax
     262
    260263      - name: Run ms-files tests as a multisite install
    261264        run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml --group ms-files
  • trunk/Gruntfile.js

    r49758 r49835  
    673673                cmd: 'phpunit',
    674674                args: ['--verbose', '-c', 'tests/phpunit/multisite.xml']
     675            },
     676            'ms-ajax': {
     677                cmd: 'phpunit',
     678                args: ['--verbose', '-c', 'tests/phpunit/multisite.xml', '--group', 'ajax']
    675679            },
    676680            'ms-files': {
  • trunk/tests/phpunit/tests/ajax/Attachments.php

    r48937 r49835  
    6666     */
    6767    public function test_wp_ajax_send_attachment_to_editor_should_return_a_link() {
     68        $this->skipWithMultisite();
     69
    6870        // Become an administrator.
    6971        $post    = $_POST;
  • trunk/tests/phpunit/tests/ajax/DeletePlugin.php

    r48997 r49835  
    127127
    128128    public function test_delete_plugin() {
     129        $this->skipWithMultisite();
    129130        $this->_setRole( 'administrator' );
    130131
  • trunk/tests/phpunit/tests/ajax/ManageThemes.php

    r48939 r49835  
    103103
    104104    public function test_update_theme() {
     105        $this->skipWithMultisite();
    105106        $this->_setRole( 'administrator' );
    106107
     
    140141
    141142    function test_uppercase_theme_slug() {
     143        $this->skipWithMultisite();
    142144        $this->_setRole( 'administrator' );
    143145
  • trunk/tests/phpunit/tests/ajax/UpdatePlugin.php

    r48997 r49835  
    131131
    132132    public function test_update_plugin() {
     133        $this->skipWithMultisite();
    133134        $this->_setRole( 'administrator' );
    134135
Note: See TracChangeset for help on using the changeset viewer.