Functional test not displaying context aware block
As discussed in IRC, pretty sure your problem is $this-&gt;drupalPlaceBlock('my_context_aware_block'); which doesn't configure the necessary context mapping. That's not visible in the UI if you only have a single context, but it's still there and then stored in the settings.

See \Drupal\block\Tests\BlockUiTest::testContextAwareBlocks(), go to a URL like admin/structure/block/add/test_context_aware/classy, and save the block.
,