X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fblock%2Ftests%2Fsrc%2FFunctional%2FBlockTest.php;h=9fb33573c46cbf4bc42e3d0c68abc9093c145c09;hp=53b48662cd234f1d22ffcfef4914d12a201b901e;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hpb=9424afc6c1f518c301bf87a23c047d1873435d05 diff --git a/web/core/modules/block/tests/src/Functional/BlockTest.php b/web/core/modules/block/tests/src/Functional/BlockTest.php index 53b48662c..9fb33573c 100644 --- a/web/core/modules/block/tests/src/Functional/BlockTest.php +++ b/web/core/modules/block/tests/src/Functional/BlockTest.php @@ -238,6 +238,30 @@ class BlockTest extends BlockTestBase { $this->assertNoRaw($block->id()); } + /** + * Tests the block operation links. + */ + public function testBlockOperationLinks() { + $this->drupalGet('admin/structure/block'); + // Go to the select block form. + $this->clickLink('Place block'); + // Select the first available block. + $this->clickLink('Place block'); + // Finally place the block + $this->submitForm([], 'Save block'); + + $url = $this->getUrl(); + $parsed = parse_url($url); + $this->assertContains('block-placement', $parsed['query']); + + $this->clickLink('Remove'); + $this->submitForm([], 'Remove'); + + $url = $this->getUrl(); + $parsed = parse_url($url); + $this->assertTrue(empty($parsed['query'])); + } + /** * Tests that the block form has a theme selector when not passed via the URL. */