X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fviews%2Ftests%2Fsrc%2FFunctional%2FUpdate%2FPlaceholderTextUpdateTest.php;fp=web%2Fcore%2Fmodules%2Fviews%2Ftests%2Fsrc%2FFunctional%2FUpdate%2FPlaceholderTextUpdateTest.php;h=c1ca1f01bc795e282b6f8b489ac8d05e7d3d8c40;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/modules/views/tests/src/Functional/Update/PlaceholderTextUpdateTest.php b/web/core/modules/views/tests/src/Functional/Update/PlaceholderTextUpdateTest.php new file mode 100644 index 000000000..c1ca1f01b --- /dev/null +++ b/web/core/modules/views/tests/src/Functional/Update/PlaceholderTextUpdateTest.php @@ -0,0 +1,43 @@ +databaseDumpFiles = [ + __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz', + __DIR__ . '/../../../fixtures/update/filter-placeholder-text.php', + ]; + } + + /** + * Tests that boolean filter values are updated properly. + */ + public function testViewsPostUpdatePlaceholderText() { + $this->runUpdates(); + + // Load and initialize our test view. + $view = View::load('placeholder_text_test'); + $data = $view->toArray(); + // Check that new settings exist. + $this->assertArrayHasKey('placeholder', $data['display']['default']['display_options']['filters']['title']['expose']); + $this->assertArrayHasKey('placeholder', $data['display']['default']['display_options']['filters']['created']['expose']); + $this->assertArrayHasKey('min_placeholder', $data['display']['default']['display_options']['filters']['created']['expose']); + $this->assertArrayHasKey('max_placeholder', $data['display']['default']['display_options']['filters']['created']['expose']); + } + +}