Problem/Motivation

Adding the patch in #40 here: #2105583: Add some sane strictness to phpunit tests to catch risky tests we see risky tests including UpdateRegistryTest

You can reproduce this even without the above patch as follows.

php vendor/bin/phpunit -c core/phpunit.xml.dist --testsuite=unit --report-useless-tests --verbose --filter UpdateRegistry 
PHPUnit 4.8.11 by Sebastian Bergmann and contributors.

Runtime:	PHP 5.6.4-4ubuntu6.3 with Xdebug 2.2.6
Configuration:	/.../core/phpunit.xml.dist

......RRRR

Time: 4.42 seconds, Memory: 137.75Mb

There were 4 risky tests:

1) Drupal\Tests\Core\Update\UpdateRegistryTest::testRegisterInvokedUpdatesWithoutExistingUpdates
This test did not perform any assertions

2) Drupal\Tests\Core\Update\UpdateRegistryTest::testRegisterInvokedUpdatesWithMultiple
This test did not perform any assertions

3) Drupal\Tests\Core\Update\UpdateRegistryTest::testRegisterInvokedUpdatesWithExistingUpdates
This test did not perform any assertions

4) Drupal\Tests\Core\Update\UpdateRegistryTest::testFilterOutInvokedUpdatesByModule
This test did not perform any assertions

OK, but incomplete, skipped, or risky tests!
Tests: 10, Assertions: 7, Risky: 4.

Mostly this seems to be because the prophecy mocks aren't asserting method calls.

Proposed resolution

Add call predictions.

Remaining tasks

User interface changes

N/A

API changes

N/A

Data model changes

N/A

RC review: Testing fixes.

CommentFileSizeAuthor
#2 updateregistrytest-2597860-2.patch3.51 KBneclimdul

Comments

neclimdul created an issue. See original summary.

neclimdul’s picture

Status: Active » Needs review
StatusFileSize
new3.51 KB

patch

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Oh yeah I guess it would pass currently when the calls aren't there, right?

neclimdul’s picture

yes, exactly.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 88f8020 and pushed to 8.0.x. Thanks!

  • alexpott committed 88f8020 on 8.0.x
    Issue #2597860 by neclimdul: UpdateRegistryTest tests missing assertions
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.