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.
Comments
Comment #2
neclimdulpatch
Comment #3
dawehnerOh yeah I guess it would pass currently when the calls aren't there, right?
Comment #4
neclimdulyes, exactly.
Comment #5
alexpottCommitted 88f8020 and pushed to 8.0.x. Thanks!