Part of #1938068: Convert UnitTestBase to PHPUnit
Directory
- core/modules/block/lib/Drupal/block/Tests
Testing
cd core
vendor/bin/phpunit modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php
Part of #1938068: Convert UnitTestBase to PHPUnit
Directory
- core/modules/block/lib/Drupal/block/Tests
Testing
cd core
vendor/bin/phpunit modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php
Comments
Comment #1
clemens.tolboomComment #2
clemens.tolboomThis is not a Unittest as it needs a container right?
Comment #3
clemens.tolboomThanks to Berdir on irc we got pointer to Change notice
New, separate, extended DrupalUnitTestBase for unit-testing functionality whose dependencies can't be injected
which makes this issue futile.
Comment #4
msonnabaum commentedIt's worth looking at this again.
Needing a container is not a blocker for phpunit, since we can mock it.
Comment #5
clemens.tolboomI partly agree as we can create a mock.
But the tests done in BlockStorageUnitTest are CRUD testing against a plugin which generates stark particular values.
That's way out of my league :(
Comment #6
ParisLiakos commentedtagging
Comment #7
clemens.tolboomComment #7.0
clemens.tolboomAdded how to test.
Comment #8
dawehnerNot sure whether there is much of a point at that time. Blocks are config entities, which have their own storage, which is tested.