X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fblock%2Ftests%2Fsrc%2FFunctional%2FBlockHookOperationTest.php;fp=web%2Fcore%2Fmodules%2Fblock%2Ftests%2Fsrc%2FFunctional%2FBlockHookOperationTest.php;h=3a5c1ffbd5c4f04c5a2259cbf71ad25d44b09f9c;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/web/core/modules/block/tests/src/Functional/BlockHookOperationTest.php b/web/core/modules/block/tests/src/Functional/BlockHookOperationTest.php new file mode 100644 index 000000000..3a5c1ffbd --- /dev/null +++ b/web/core/modules/block/tests/src/Functional/BlockHookOperationTest.php @@ -0,0 +1,51 @@ +drupalCreateUser($permissions); + $this->drupalLogin($admin_user); + } + + /** + * Tests the block list to see if the test_operation link is added. + */ + public function testBlockOperationAlter() { + // Add a test block, any block will do. + // Set the machine name so the test_operation link can be built later. + $block_id = Unicode::strtolower($this->randomMachineName(16)); + $this->drupalPlaceBlock('system_powered_by_block', ['id' => $block_id]); + + // Get the Block listing. + $this->drupalGet('admin/structure/block'); + + $test_operation_link = 'admin/structure/block/manage/' . $block_id . '/test_operation'; + // Test if the test_operation link is on the page. + $this->assertLinkByHref($test_operation_link); + } + +}