Chris@0: drupalCreateUser($permissions); Chris@0: $this->drupalLogin($admin_user); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Tests the block list to see if the test_operation link is added. Chris@0: */ Chris@0: public function testBlockOperationAlter() { Chris@0: // Add a test block, any block will do. Chris@0: // Set the machine name so the test_operation link can be built later. Chris@0: $block_id = Unicode::strtolower($this->randomMachineName(16)); Chris@0: $this->drupalPlaceBlock('system_powered_by_block', ['id' => $block_id]); Chris@0: Chris@0: // Get the Block listing. Chris@0: $this->drupalGet('admin/structure/block'); Chris@0: Chris@0: $test_operation_link = 'admin/structure/block/manage/' . $block_id . '/test_operation'; Chris@0: // Test if the test_operation link is on the page. Chris@0: $this->assertLinkByHref($test_operation_link); Chris@0: } Chris@0: Chris@0: }