[wp-trac] [WordPress Trac] #46567: Run AJAX test gruoup for multisite

WordPress Trac noreply at wordpress.org
Tue Mar 19 23:12:14 UTC 2019


#46567: Run AJAX test gruoup for multisite
-----------------------------------+------------------------
 Reporter:  desrosj                |       Owner:  (none)
     Type:  task (blessed)         |      Status:  new
 Priority:  normal                 |   Milestone:  5.2
Component:  Build/Test Tools       |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  2nd-opinion has-patch  |     Focuses:  multisite
-----------------------------------+------------------------

Comment (by garrett-eclipse):

 Hi @desrosj I just wanted to provide test results to help this work move
 forward.
 Once I applied the patch from #43438 all the privacy tests were corrected
 leaving a single error and 4 failures listed below;

 {{{
 There was 1 error:

 1)
 Tests_Ajax_Attachments::test_wp_ajax_send_attachment_to_editor_should_return_a_link
 Undefined index: file

 /Users/garretthyder/WordPress/43438-unit-tests/tests/phpunit/includes
 /abstract-testcase.php:1155
 /Users/garretthyder/WordPress/43438-unit-
 tests/tests/phpunit/tests/ajax/Attachments.php:84

 --

 There were 4 failures:

 1) Tests_Ajax_Delete_Plugin::test_delete_plugin
 Failed asserting that two arrays are equal.
 --- Expected
 +++ Actual
 @@ @@
  Array (
 -    0 => true
 +    0 => false
      1 => Array (
          'delete' => 'plugin'
          'slug' => 'foo'
 -        'plugin' => 'foo.php'
 -        'pluginName' => ''
 +        'errorMessage' => 'Sorry, you are not allowed to... site.'
      )
  )

 /Users/garretthyder/WordPress/43438-unit-tests/tests/phpunit/includes
 /abstract-testcase.php:654
 /Users/garretthyder/WordPress/43438-unit-
 tests/tests/phpunit/tests/ajax/DeletePlugin.php:156

 2) Tests_Ajax_Manage_Themes::test_update_theme
 Failed asserting that two arrays are equal.
 --- Expected
 +++ Actual
 @@ @@
      1 => Array (
          'update' => 'theme'
          'slug' => 'twentyten'
 -        'errorMessage' => 'The theme is at the latest version.'
 -        'oldVersion' => '2.8'
 +        'errorMessage' => 'Sorry, you are not allowed to update themes
 for this site.'
 +        'oldVersion' => ''
          'newVersion' => ''
 -        'debug' => Array (...)
      )
  )

 /Users/garretthyder/WordPress/43438-unit-tests/tests/phpunit/includes
 /abstract-testcase.php:654
 /Users/garretthyder/WordPress/43438-unit-
 tests/tests/phpunit/tests/ajax/ManageThemes.php:138

 3) Tests_Ajax_Manage_Themes::test_uppercase_theme_slug
 Failed asserting that two arrays are equal.
 --- Expected
 +++ Actual
 @@ @@
      1 => Array (
          'update' => 'theme'
          'slug' => 'camelCase'
 -        'oldVersion' => '1.0'
 +        'oldVersion' => ''
          'newVersion' => ''
 -        'errorMessage' => 'The theme is at the latest version.'
 -        'debug' => Array (...)
 +        'errorMessage' => 'Sorry, you are not allowed to update themes
 for this site.'
      )
  )

 /Users/garretthyder/WordPress/43438-unit-tests/tests/phpunit/includes
 /abstract-testcase.php:654
 /Users/garretthyder/WordPress/43438-unit-
 tests/tests/phpunit/tests/ajax/ManageThemes.php:169

 4) Tests_Ajax_Update_Plugin::test_update_plugin
 Failed asserting that two arrays are equal.
 --- Expected
 +++ Actual
 @@ @@
      1 => Array (
          'update' => 'plugin'
          'slug' => 'hello-dolly'
 -        'plugin' => 'hello.php'
 -        'pluginName' => 'Hello Dolly'
 -        'errorMessage' => 'Plugin update failed.'
 -        'oldVersion' => 'Version 1.7.2'
 +        'errorMessage' => 'Sorry, you are not allowed to update plugins
 for this site.'
 +        'oldVersion' => ''
          'newVersion' => ''
 -        'debug' => Array (...)
      )
  )

 /Users/garretthyder/WordPress/43438-unit-tests/tests/phpunit/includes
 /abstract-testcase.php:654
 /Users/garretthyder/WordPress/43438-unit-
 tests/tests/phpunit/tests/ajax/UpdatePlugin.php:167

 ERRORS!
 Tests: 160, Assertions: 670, Errors: 1, Failures: 4, Skipped: 1.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46567#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list