From c96e538a45c2d656f32330088824eda9524bc5fb Mon Sep 17 00:00:00 2001 From: Mike Decker Date: Tue, 24 Oct 2023 18:26:09 -0700 Subject: [PATCH] Use drupal time --- .../sync/smart_date.smart_date_format.day.yml | 6 ++-- ...art_date.smart_date_format.short_month.yml | 2 +- .../AuthenticatedPermissionsCest.php | 18 +++++----- .../acceptance/Content/BasicPageCest.php | 24 ++++++------- .../acceptance/Content/CoursesCest.php | 4 +-- .../acceptance/Content/CustomBlockCest.php | 2 +- .../acceptance/Content/DefaultContentCest.php | 10 +++--- .../acceptance/Content/EventsCest.php | 35 +++++++++++-------- .../acceptance/Content/EventsSeriesCest.php | 12 +++---- .../acceptance/Content/NewsCest.php | 18 +++++----- .../acceptance/Content/PersonCest.php | 24 ++++++------- .../acceptance/Content/PolicyCest.php | 8 ++--- .../acceptance/Content/PublicationsCest.php | 14 ++++---- .../acceptance/Content/SearchBlockCest.php | 2 +- .../acceptance/Contrib/ConfigReadonlyCest.php | 2 +- .../acceptance/Contrib/MenuBlockCest.php | 2 +- .../Contrib/NodeRevisionDeleteCest.php | 2 +- .../acceptance/Contrib/ViewsBulkEditCest.php | 2 +- .../acceptance/Contrib/XmlsitemapCest.php | 2 +- .../GlobalMessage/GlobalMessageCest.php | 14 ++++---- tests/codeception/acceptance/HomePageCest.php | 4 +-- .../LocalFooter/LocalFooterCest.php | 8 ++--- .../LocalFooter/LocalFooterLockupCest.php | 28 +++++++-------- .../LockupSettings/LockupSettingsCest.php | 30 ++++++++-------- .../LockupSettingsPermsCest.php | 6 ++-- .../acceptance/Media/MediaCest.php | 22 ++++++------ .../acceptance/Media/MediaFormsCest.php | 2 +- .../acceptance/Media/MediaPermissionsCest.php | 10 +++--- .../Paragraphs/Issue2901390Cest.php | 2 +- .../acceptance/Paragraphs/ListsCest.php | 32 ++++++++--------- .../Paragraphs/MediaWithCaptionCest.php | 2 +- .../Paragraphs/StanfordCardCest.php | 4 +-- tests/codeception/acceptance/SubThemeCest.php | 4 +-- .../SuperFooter/SuperFooterCest.php | 14 ++++---- tests/codeception/acceptance/SystemCest.php | 3 +- .../acceptance/SystemSiteConfigCest.php | 4 +-- .../acceptance/TextFormatsCest.php | 2 +- .../acceptance/Users/DefaultUsersCest.php | 2 +- .../acceptance/Users/IntranetCest.php | 8 ++--- .../acceptance/Users/RolesCest.php | 18 +++++----- 40 files changed, 208 insertions(+), 200 deletions(-) diff --git a/config/sync/smart_date.smart_date_format.day.yml b/config/sync/smart_date.smart_date_format.day.yml index eb88f8fa0..cfe45eecc 100644 --- a/config/sync/smart_date.smart_date_format.day.yml +++ b/config/sync/smart_date.smart_date_format.day.yml @@ -8,8 +8,8 @@ date_format: j time_format: '' time_hour_format: '' allday_label: '' -separator: ' - ' -join: ', ' +separator: '' +join: '' ampm_reduce: '1' date_first: '1' -site_time_toggle: '1' +site_time_toggle: '0' diff --git a/config/sync/smart_date.smart_date_format.short_month.yml b/config/sync/smart_date.smart_date_format.short_month.yml index 7dc793d69..a2892e527 100644 --- a/config/sync/smart_date.smart_date_format.short_month.yml +++ b/config/sync/smart_date.smart_date_format.short_month.yml @@ -12,4 +12,4 @@ separator: ' - ' join: ', ' ampm_reduce: '1' date_first: '1' -site_time_toggle: '1' +site_time_toggle: '0' diff --git a/tests/codeception/acceptance/AuthenticatedPermissionsCest.php b/tests/codeception/acceptance/AuthenticatedPermissionsCest.php index e62e6f9d8..036299090 100644 --- a/tests/codeception/acceptance/AuthenticatedPermissionsCest.php +++ b/tests/codeception/acceptance/AuthenticatedPermissionsCest.php @@ -49,7 +49,7 @@ public function _after(AcceptanceTester $I) { /** * Make sure authenticated users can't access things they should not. */ - protected function footestAuthenticatedUserRestrictions(AcceptanceTester $I) { + public function testAuthenticatedUserRestrictions(AcceptanceTester $I) { $I->logInWithRole('authenticated'); $I->amOnPage('/'); $I->canSeeResponseCodeIs(200); @@ -76,7 +76,7 @@ protected function footestAuthenticatedUserRestrictions(AcceptanceTester $I) { /** * Make sure authenticated users can access things they should. */ - protected function footestAuthenticatedUserPermissions(AcceptanceTester $I) { + public function testAuthenticatedUserPermissions(AcceptanceTester $I) { $I->logInWithRole('authenticated'); $I->amOnPage('/patterns'); $I->canSeeResponseCodeIs(200); @@ -85,7 +85,7 @@ protected function footestAuthenticatedUserPermissions(AcceptanceTester $I) { /** * Site Manager cannot escalate their own role above Site Manager. */ - protected function footestSiteManagerEscalationSelf(AcceptanceTester $I) { + public function testSiteManagerEscalationSelf(AcceptanceTester $I) { $site_manager = $I->logInWithRole('site_manager'); $site_manager_id = $site_manager->id(); $I->amOnPage('/admin/users'); @@ -101,7 +101,7 @@ protected function footestSiteManagerEscalationSelf(AcceptanceTester $I) { /** * Site Manager cannot escalate others' role above Site Manager. */ - protected function footestSiteManagerEscalationOthers(AcceptanceTester $I) { + public function testSiteManagerEscalationOthers(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $I->amOnPage('/admin/users'); $I->canSee('Morgan'); @@ -115,7 +115,7 @@ protected function footestSiteManagerEscalationOthers(AcceptanceTester $I) { /** * PHP code is not allowed in redirects. */ - protected function footestPhpInRedirect(AcceptanceTester $I) { + public function testPhpInRedirect(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $I->amOnPage('/admin/config/search/redirect/add'); $I->fillField('#edit-redirect-source-0-path', 'home'); @@ -128,7 +128,7 @@ protected function footestPhpInRedirect(AcceptanceTester $I) { /** * PHP code is escaped and not run when added to content. */ - protected function footestPhpInContent(AcceptanceTester $I) { + public function testPhpInContent(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $I->amOnPage('/node/add/stanford_page'); $I->fillField('#edit-title-0-value', ''); @@ -140,7 +140,7 @@ protected function footestPhpInContent(AcceptanceTester $I) { /** * PHP files are not allowed as uploads for favicons. */ - protected function footestPhpUploadInFavicon(AcceptanceTester $I) { + public function testPhpUploadInFavicon(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/appearance/settings'); $I->seeCheckboxIsChecked('#edit-default-favicon'); @@ -156,7 +156,7 @@ protected function footestPhpUploadInFavicon(AcceptanceTester $I) { /** * PHP files are not allowed as uploads for the logo. */ - protected function footestPhpUploadInLogo(AcceptanceTester $I) { + public function testPhpUploadInLogo(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/appearance/settings'); $I->seeCheckboxIsChecked('#edit-default-logo'); @@ -173,7 +173,7 @@ protected function footestPhpUploadInLogo(AcceptanceTester $I) { /** * Vocabs aren't seen if there are no permissions for them. */ - protected function footestTaxonomyOverviewPage(AcceptanceTester $I) { + public function testTaxonomyOverviewPage(AcceptanceTester $I) { $name = $this->faker->firstName; $vocab = $I->createEntity([ 'vid' => strtolower($name), diff --git a/tests/codeception/acceptance/Content/BasicPageCest.php b/tests/codeception/acceptance/Content/BasicPageCest.php index fcf227af9..8f72a425f 100644 --- a/tests/codeception/acceptance/Content/BasicPageCest.php +++ b/tests/codeception/acceptance/Content/BasicPageCest.php @@ -29,7 +29,7 @@ public function __construct() { * @group pathauto * @group menu_link_weight */ - protected function footestCreatingPage(AcceptanceTester $I) { + public function testCreatingPage(AcceptanceTester $I) { $node_title = $this->faker->text(20); $node = $I->createEntity([ 'type' => 'stanford_page', @@ -72,7 +72,7 @@ protected function footestCreatingPage(AcceptanceTester $I) { /** * Test deleting menu items clears them from the main menu. */ - protected function footestDeletedMenuItems(AcceptanceTester $I) { + public function testDeletedMenuItems(AcceptanceTester $I) { $node_title = $this->faker->text(20); $node = $I->createEntity([ 'type' => 'stanford_page', @@ -100,7 +100,7 @@ protected function footestDeletedMenuItems(AcceptanceTester $I) { /** * Number of h1 tags should always be 1. */ - protected function footestH1Tags(AcceptanceTester $I) { + public function testH1Tags(AcceptanceTester $I) { $I->amOnPage('/' . $this->faker->text); $I->canSeeResponseCodeIs(404); $I->canSeeNumberOfElements('h1', 1); @@ -116,7 +116,7 @@ protected function footestH1Tags(AcceptanceTester $I) { * * Regression test for D8CORE-1547. */ - protected function footestRevisionPage(AcceptanceTester $I) { + public function testRevisionPage(AcceptanceTester $I) { $title = $this->faker->words(3, TRUE); $I->logInWithRole('site_manager'); $node = $I->createEntity(['title' => $title, 'type' => 'stanford_page']); @@ -128,7 +128,7 @@ protected function footestRevisionPage(AcceptanceTester $I) { /** * There should be Page Metadata fields */ - protected function footestPageDescription(AcceptanceTester $I) { + public function testPageDescription(AcceptanceTester $I) { $title = $this->faker->words(3, TRUE); $description = $this->faker->words(10, TRUE); $type_term = $I->createEntity([ @@ -150,7 +150,7 @@ protected function footestPageDescription(AcceptanceTester $I) { /** * Test that the vocabulary and default terms exist. */ - protected function footestBasicPageVocabularyTermsExists(AcceptanceTester $I) { + public function testBasicPageVocabularyTermsExists(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $I->amOnPage("/admin/structure/taxonomy/manage/basic_page_types/overview"); $I->canSeeResponseCodeIs(200); @@ -167,7 +167,7 @@ protected function footestBasicPageVocabularyTermsExists(AcceptanceTester $I) { * * @group menu_link_weight */ - protected function footestUnpublishedMenuItems(AcceptanceTester $I) { + public function testUnpublishedMenuItems(AcceptanceTester $I) { $unpublished_title = $this->faker->words(5, TRUE); $unpublished_node = $I->createEntity([ 'type' => 'stanford_page', @@ -205,7 +205,7 @@ protected function footestUnpublishedMenuItems(AcceptanceTester $I) { /** * Clone a basic page. */ - protected function footestClone(AcceptanceTester $I) { + public function testClone(AcceptanceTester $I) { $title = $this->faker->words(3, TRUE); $I->logInWithRole('contributor'); @@ -228,7 +228,7 @@ protected function footestClone(AcceptanceTester $I) { * * @group scheduler */ - protected function footestScheduler(AcceptanceTester $I) { + public function testScheduler(AcceptanceTester $I) { $time = \Drupal::time(); /** @var \Drupal\system\TimeZoneResolver $timezone_resolver */ @@ -257,7 +257,7 @@ protected function footestScheduler(AcceptanceTester $I) { /** * Validate the Spacer Paragraph type exists */ - protected function footestSpacerParagraph(AcceptanceTester $I) { + public function testSpacerParagraph(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/structure/paragraphs_type'); $I->canSee('Spacer'); @@ -269,7 +269,7 @@ protected function footestSpacerParagraph(AcceptanceTester $I) { * * @group metadata */ - protected function footestMetaData(AcceptanceTester $I) { + public function testMetaData(AcceptanceTester $I) { $values = [ 'banner_image_alt' => $this->faker->words(3, TRUE), 'meta_image_alt' => $this->faker->words(3, TRUE), @@ -364,7 +364,7 @@ protected function footestMetaData(AcceptanceTester $I) { /** * @group search-results */ - protected function footestSearchResult(AcceptanceTester $I) { + public function testSearchResult(AcceptanceTester $I) { $text = $this->faker->paragraphs(2, TRUE); $wysiwyg = $I->createEntity([ 'type' => 'stanford_wysiwyg', diff --git a/tests/codeception/acceptance/Content/CoursesCest.php b/tests/codeception/acceptance/Content/CoursesCest.php index c26a4f456..3a2143963 100644 --- a/tests/codeception/acceptance/Content/CoursesCest.php +++ b/tests/codeception/acceptance/Content/CoursesCest.php @@ -24,7 +24,7 @@ public function __construct() { /** * Test for view pages and taxonomy functionality */ - protected function footestViewPagesExist(AcceptanceTester $I) { + public function testViewPagesExist(AcceptanceTester $I) { $I->logInWithRole('administrator'); $quarters_term = $this->createCourseQuartersTerm($I); $subject_term = $this->createCourseSubjectsTerm($I); @@ -63,7 +63,7 @@ protected function footestViewPagesExist(AcceptanceTester $I) { /** * Test rabbit hole settings and field locking */ - protected function footestRabbitHoleRedirects(AcceptanceTester $I) { + public function testRabbitHoleRedirects(AcceptanceTester $I) { $I->logInWithRole('administrator'); $quarters_term = $this->createCourseQuartersTerm($I); $subject_term = $this->createCourseSubjectsTerm($I); diff --git a/tests/codeception/acceptance/Content/CustomBlockCest.php b/tests/codeception/acceptance/Content/CustomBlockCest.php index 189e95961..a15d5da0f 100644 --- a/tests/codeception/acceptance/Content/CustomBlockCest.php +++ b/tests/codeception/acceptance/Content/CustomBlockCest.php @@ -22,7 +22,7 @@ public function __construct() { /** * Site managers should be able to edit custom blocks. */ - protected function footestCustomBlockAccess(AcceptanceTester $I) { + public function testCustomBlockAccess(AcceptanceTester $I) { $block = $I->createEntity([ 'type' => 'stanford_component_block', 'info' => $this->faker->word(3, TRUE), diff --git a/tests/codeception/acceptance/Content/DefaultContentCest.php b/tests/codeception/acceptance/Content/DefaultContentCest.php index e9172f6da..5f2da6f17 100644 --- a/tests/codeception/acceptance/Content/DefaultContentCest.php +++ b/tests/codeception/acceptance/Content/DefaultContentCest.php @@ -10,7 +10,7 @@ class DefaultContentCest { /** * Test default images. */ - protected function footestDefaultImages(AcceptanceTester $I) { + public function testDefaultImages(AcceptanceTester $I) { $files = \Drupal::entityTypeManager()->getStorage('file')->loadMultiple(); /** @var \Drupal\file\FileInterface $file */ @@ -30,7 +30,7 @@ protected function footestDefaultImages(AcceptanceTester $I) { /** * Default content pages and meta data exist. */ - protected function footestExistingContent(AcceptanceTester $I) { + public function testExistingContent(AcceptanceTester $I) { $pages = [ '/', '/resources', @@ -49,7 +49,7 @@ protected function footestExistingContent(AcceptanceTester $I) { /** * There should be at least 15 media items. */ - protected function footestMedia(AcceptanceTester $I) { + public function testMedia(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/content/media'); $I->canSeeNumberOfElements('table img, form img', [15, 999]); @@ -58,7 +58,7 @@ protected function footestMedia(AcceptanceTester $I) { /** * XML Sitemap should exist after cron. */ - protected function footestXmlSitemap(AcceptanceTester $I) { + public function testXmlSitemap(AcceptanceTester $I) { $I->runDrush('cron'); $I->amOnPage('/sitemap.xml'); $I->canSeeResponseCodeIs(200); @@ -69,7 +69,7 @@ protected function footestXmlSitemap(AcceptanceTester $I) { * * @group menu_link_weight */ - protected function footestMenuItems(AcceptanceTester $I) { + public function testMenuItems(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $I->amOnPage('/admin/structure/menu/manage/main'); diff --git a/tests/codeception/acceptance/Content/EventsCest.php b/tests/codeception/acceptance/Content/EventsCest.php index 66c26956c..40c8fb1d4 100644 --- a/tests/codeception/acceptance/Content/EventsCest.php +++ b/tests/codeception/acceptance/Content/EventsCest.php @@ -36,7 +36,7 @@ public function _after(AcceptanceTester $I) { * * @group D8CORE-4858 */ - protected function footestListIntro(AcceptanceTester $I) { + public function testListIntro(AcceptanceTester $I) { // Start with no events. $nodes = \Drupal::entityTypeManager() ->getStorage('node') @@ -97,7 +97,7 @@ protected function footestListIntro(AcceptanceTester $I) { /** * Ensure events are in the sitemap. */ - protected function footestXMLSiteMap(AcceptanceTester $I) { + public function testXMLSiteMap(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/search/xmlsitemap/settings/node/stanford_event'); $I->seeOptionIsSelected('#edit-xmlsitemap-status', 'Included'); @@ -107,7 +107,7 @@ protected function footestXMLSiteMap(AcceptanceTester $I) { /** * Test Page Title Conditions. */ - protected function footestPageTitleIgnoreCondition(AcceptanceTester $I) { + public function testPageTitleIgnoreCondition(AcceptanceTester $I) { $I->logInWithRole('administrator'); // Todo: make theme name dynamic. $I->amOnPage('/admin/structure/block/manage/stanford_basic_pagetitle'); @@ -121,7 +121,7 @@ protected function footestPageTitleIgnoreCondition(AcceptanceTester $I) { /** * Test the event content type exists and has at least a couple of fields. */ - protected function footestContentTypeExists(AcceptanceTester $I) { + public function testContentTypeExists(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/structure/types/manage/stanford_event/fields'); $I->canSee('body'); @@ -148,7 +148,7 @@ protected function footestContentTypeExists(AcceptanceTester $I) { /** * Test Access to stuff for contrib role. */ - protected function footestContributorPerms(AcceptanceTester $I) { + public function testContributorPerms(AcceptanceTester $I) { $I->logInWithRole('contributor'); // Can create a node. @@ -188,7 +188,7 @@ protected function footestContributorPerms(AcceptanceTester $I) { /** * Test thing. */ - protected function footestEditorPerms(AcceptanceTester $I) { + public function testEditorPerms(AcceptanceTester $I) { $I->logInWithRole('site_editor'); // Can create a node. @@ -233,7 +233,7 @@ protected function footestEditorPerms(AcceptanceTester $I) { /** * Test thing. */ - protected function footestSiteManagerPerms(AcceptanceTester $I) { + public function testSiteManagerPerms(AcceptanceTester $I) { $I->logInWithRole('site_manager'); // Can create a node. @@ -277,7 +277,7 @@ protected function footestSiteManagerPerms(AcceptanceTester $I) { /** * Test to make sure the main menu link is there. */ - protected function footestDefaultContentExists(AcceptanceTester $I) { + public function testDefaultContentExists(AcceptanceTester $I) { $I->logInWithRole('administrator'); // Events Main Menu Link. $I->amOnPage('/admin/structure/menu/manage/main'); @@ -287,7 +287,7 @@ protected function footestDefaultContentExists(AcceptanceTester $I) { /** * Published checkbox should be hidden on term edit pages. */ - protected function footestTermPublishing(AcceptanceTester $I) { + public function testTermPublishing(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $term = $I->createEntity([ 'vid' => 'event_audience', @@ -307,7 +307,7 @@ protected function footestTermPublishing(AcceptanceTester $I) { /** * Clone events get incremented date. */ - protected function footestClone(AcceptanceTester $I) { + public function testClone(AcceptanceTester $I) { $user = $I->createUserWithRoles(['contributor']); /** @var \Drupal\node\NodeInterface $node */ $node = $this->createEventNode($I); @@ -359,19 +359,26 @@ public function testEventCard(AcceptanceTester $I) { $month = $xpath->query('//span[@class="su-event-start-month"]'); $I->assertNotEmpty($month); - $I->assertEquals(date('M', time()), $month->item(0)->nodeValue, 'Start Month does not match'); + $I->assertEquals(self::getDateTimeString('M', time()), preg_replace('/(\r\n|\n|\r)/', '', $month->item(0)->nodeValue), 'Start Month does not match'); $day = $xpath->query('//span[@class="su-event-start-date"]'); $I->assertNotEmpty($day); - $I->assertEquals(date('j', time()), $day->item(0)->nodeValue, 'Start Date does not match'); + $I->assertEquals(self::getDateTimeString('j', time()), preg_replace('/(\r\n|\n|\r)/', '', $day->item(0)->nodeValue), 'Start Date does not match'); $month = $xpath->query('//span[@class="su-event-end-month"]'); $I->assertNotEmpty($month); - $I->assertEquals(date('M', time() + (60 * 60 * 24)), $month->item(0)->nodeValue, 'End Month does not match'); + $I->assertEquals(self::getDateTimeString('M', time() + (60 * 60 * 24)), preg_replace('/(\r\n|\n|\r)/', '', $month->item(0)->nodeValue), 'End Month does not match'); $day = $xpath->query('//span[@class="su-event-end-date"]'); $I->assertNotEmpty($day); - $I->assertEquals(date('j', time() + (60 * 60 * 24)), $day->item(0)->nodeValue, 'End Date does not match'); + $I->assertEquals(self::getDateTimeString('j', time() + (60 * 60 * 24)), preg_replace('/(\r\n|\n|\r)/', '', $day->item(0)->nodeValue), 'End Date does not match'); + } + + protected static function getDateTimeString($format, $time) { + $timezone = \Drupal::config('system.date') + ->get('timezone.default') ?: @date_default_timezone_get(); + return \Drupal::service('date.formatter') + ->format($time, 'custom', $format, $timezone); } /** diff --git a/tests/codeception/acceptance/Content/EventsSeriesCest.php b/tests/codeception/acceptance/Content/EventsSeriesCest.php index 479550d9b..0b47c220b 100644 --- a/tests/codeception/acceptance/Content/EventsSeriesCest.php +++ b/tests/codeception/acceptance/Content/EventsSeriesCest.php @@ -26,7 +26,7 @@ public function __construct() { /** * Ensure events are in the sitemap. */ - protected function footestXMLSiteMap(AcceptanceTester $I) { + public function testXMLSiteMap(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/search/xmlsitemap/settings/node/stanford_event_series'); $I->seeOptionIsSelected('#edit-xmlsitemap-status', 'Included'); @@ -36,7 +36,7 @@ protected function footestXMLSiteMap(AcceptanceTester $I) { /** * Test Page Title Conditions. */ - protected function footestPageTitleIgnoreCondition(AcceptanceTester $I) { + public function testPageTitleIgnoreCondition(AcceptanceTester $I) { $I->logInWithRole('administrator'); // Todo: make theme name dynamic. $I->amOnPage('/admin/structure/block/manage/stanford_basic_pagetitle'); @@ -50,7 +50,7 @@ protected function footestPageTitleIgnoreCondition(AcceptanceTester $I) { /** * Test the the event content type exists and has at least a couple of fields. */ - protected function footestContentTypeExists(AcceptanceTester $I) { + public function testContentTypeExists(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/structure/types/manage/stanford_event_series/fields'); $I->canSee('su_event_series_subheadline'); @@ -60,7 +60,7 @@ protected function footestContentTypeExists(AcceptanceTester $I) { /** * Test Access to stuff for contrib role. */ - protected function footestContributorPerms(AcceptanceTester $I) { + public function testContributorPerms(AcceptanceTester $I) { $I->logInWithRole('contributor'); // D8CORE-4551: Can NOT create a node. @@ -85,7 +85,7 @@ protected function footestContributorPerms(AcceptanceTester $I) { /** * Test thing. */ - protected function footestEditorPerms(AcceptanceTester $I) { + public function testEditorPerms(AcceptanceTester $I) { $I->logInWithRole('site_editor'); // Can create a node. @@ -115,7 +115,7 @@ protected function footestEditorPerms(AcceptanceTester $I) { /** * Test thing. */ - protected function footestSiteManagerPerms(AcceptanceTester $I) { + public function testSiteManagerPerms(AcceptanceTester $I) { $I->logInWithRole('site_manager'); // Can create a node. diff --git a/tests/codeception/acceptance/Content/NewsCest.php b/tests/codeception/acceptance/Content/NewsCest.php index 84fa98b10..4e00a502c 100644 --- a/tests/codeception/acceptance/Content/NewsCest.php +++ b/tests/codeception/acceptance/Content/NewsCest.php @@ -26,7 +26,7 @@ public function __construct() { /** * News list intro block is at the top of the page. */ - protected function footestListIntro(AcceptanceTester $I) { + public function testListIntro(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $I->amOnPage('/news'); $I->canSeeResponseCodeIs(200); @@ -35,7 +35,7 @@ protected function footestListIntro(AcceptanceTester $I) { /** * Test that the default content has installed and is unpublished. */ - protected function footestDefaultContentExists(AcceptanceTester $I) { + public function testDefaultContentExists(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage("/admin/content"); $I->see("Sample: Smith Conference"); @@ -57,7 +57,7 @@ protected function footestDefaultContentExists(AcceptanceTester $I) { /** * Test that the vocabulary and terms exist. */ - protected function footestVocabularyTermsExists(AcceptanceTester $I) { + public function testVocabularyTermsExists(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage("/admin/structure/taxonomy/manage/stanford_news_topics/overview"); $I->canSeeNumberOfElements("input.term-id", [2, 99]); @@ -66,7 +66,7 @@ protected function footestVocabularyTermsExists(AcceptanceTester $I) { /** * Test that the view pages exist. */ - protected function footestViewPagesExist(AcceptanceTester $I) { + public function testViewPagesExist(AcceptanceTester $I) { $I->amOnPage("/news"); $I->seeLink('Announcement'); $I->click("a[href='/news/announcement']"); @@ -77,7 +77,7 @@ protected function footestViewPagesExist(AcceptanceTester $I) { /** * Validate external content redirect. */ - protected function footestExternalSourceArticle(AcceptanceTester $I) { + public function testExternalSourceArticle(AcceptanceTester $I) { $node = $I->createEntity([ 'type' => 'stanford_news', 'title' => $this->faker->words(3, TRUE), @@ -98,7 +98,7 @@ protected function footestExternalSourceArticle(AcceptanceTester $I) { * Test that only two of three new news nodes show up in the more news view * on the node page. */ - protected function footestMoreNewsView(AcceptanceTester $I) { + public function testMoreNewsView(AcceptanceTester $I) { $I->logInWithRole('administrator'); $first_news = $I->createEntity([ @@ -121,7 +121,7 @@ protected function footestMoreNewsView(AcceptanceTester $I) { /** * Test that the XML sitemap and metatag configuration is set. */ - protected function footestXMLMetaDataRevisions(AcceptanceTester $I) { + public function testXMLMetaDataRevisions(AcceptanceTester $I) { $I->logInWithRole('administrator'); // Revision Delete is enabled. @@ -144,7 +144,7 @@ protected function footestXMLMetaDataRevisions(AcceptanceTester $I) { /** * Published checkbox should be hidden on term edit pages. */ - protected function footestTermPublishing(AcceptanceTester $I) { + public function testTermPublishing(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $term = $I->createEntity([ 'vid' => 'stanford_news_topics', @@ -159,7 +159,7 @@ protected function footestTermPublishing(AcceptanceTester $I) { * * @group metadata */ - protected function footestMetaData(AcceptanceTester $I) { + public function testMetaData(AcceptanceTester $I) { $values = [ 'featured_image_alt' => $this->faker->words(3, TRUE), 'banner_image_alt' => $this->faker->words(3, TRUE), diff --git a/tests/codeception/acceptance/Content/PersonCest.php b/tests/codeception/acceptance/Content/PersonCest.php index 21d3165f6..4f6c3f7bf 100644 --- a/tests/codeception/acceptance/Content/PersonCest.php +++ b/tests/codeception/acceptance/Content/PersonCest.php @@ -26,7 +26,7 @@ public function __construct() { /** * Test that the default content has installed and is unpublished. */ - protected function footestDefaultContentExists(AcceptanceTester $I) { + public function testDefaultContentExists(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/content'); $I->see('Haley Jackson'); @@ -39,7 +39,7 @@ protected function footestDefaultContentExists(AcceptanceTester $I) { /** * Test that the vocabulary and terms exist. */ - protected function footestVocabularyTermsExists(AcceptanceTester $I) { + public function testVocabularyTermsExists(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/structure/taxonomy/manage/stanford_person_types/overview'); $I->canSeeNumberOfElements('.term-id', 14); @@ -48,7 +48,7 @@ protected function footestVocabularyTermsExists(AcceptanceTester $I) { /** * Test that the view pages exist. */ - protected function footestViewPagesExist(AcceptanceTester $I) { + public function testViewPagesExist(AcceptanceTester $I) { $I->amOnPage('/people'); $I->seeLink('Student'); $I->seeLink('Staff'); @@ -61,7 +61,7 @@ protected function footestViewPagesExist(AcceptanceTester $I) { * Test that content that gets created has the right url, header, and shows * up in the all view. */ - protected function footestCreatePerson(AcceptanceTester $I) { + public function testCreatePerson(AcceptanceTester $I) { $term = $I->createEntity([ 'vid' => 'stanford_person_types', 'name' => $this->faker->word, @@ -91,7 +91,7 @@ protected function footestCreatePerson(AcceptanceTester $I) { /** * Test that the XML sitemap and metatag configuration is set. */ - protected function footestXMLMetaDataRevisions(AcceptanceTester $I) { + public function testXMLMetaDataRevisions(AcceptanceTester $I) { $I->logInWithRole('administrator'); // Revision Delete is enabled. @@ -114,7 +114,7 @@ protected function footestXMLMetaDataRevisions(AcceptanceTester $I) { /** * CAP-52: Check for the new fields. */ - protected function footestCap52Fields(AcceptanceTester $I) { + public function testCap52Fields(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/structure/types/manage/stanford_person/fields'); @@ -131,7 +131,7 @@ protected function footestCap52Fields(AcceptanceTester $I) { /** * Special characters should stay. */ - protected function footestSpecialCharacters(AcceptanceTester $I) { + public function testSpecialCharacters(AcceptanceTester $I) { $first_name = $this->faker->firstName; $middle_name = $this->faker->firstName; $last_name = $this->faker->lastName; @@ -150,7 +150,7 @@ protected function footestSpecialCharacters(AcceptanceTester $I) { * * @group 4704 */ - protected function footestD8Core2613Terms(AcceptanceTester $I) { + public function testD8Core2613Terms(AcceptanceTester $I) { $term1 = $I->createEntity([ 'name' => $this->faker->words(2, TRUE), 'vid' => 'stanford_person_types', @@ -244,7 +244,7 @@ protected function footestD8Core2613Terms(AcceptanceTester $I) { /** * Published checkbox should be hidden on term edit pages. */ - protected function footestTermPublishing(AcceptanceTester $I) { + public function testTermPublishing(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $term = $I->createEntity([ 'vid' => 'stanford_person_types', @@ -257,7 +257,7 @@ protected function footestTermPublishing(AcceptanceTester $I) { /** * Unpublished profiles should not display in the list. */ - protected function footestPublishedStatus(AcceptanceTester $I) { + public function testPublishedStatus(AcceptanceTester $I) { $term = $I->createEntity([ 'name' => $this->faker->words(2, TRUE), 'vid' => 'stanford_person_types', @@ -288,7 +288,7 @@ protected function footestPublishedStatus(AcceptanceTester $I) { * * @group metadata */ - protected function footestMetaData(AcceptanceTester $I) { + public function testMetaData(AcceptanceTester $I) { $values = [ 'image_alt' => $this->faker->words(3, TRUE), 'body' => $this->faker->paragraph, @@ -344,7 +344,7 @@ protected function footestMetaData(AcceptanceTester $I) { /** * Deleting the taxonomy term doesn't break the form. */ - protected function footestDeletedTerm(AcceptanceTester $I) { + public function testDeletedTerm(AcceptanceTester $I) { $term = $I->createEntity([ 'name' => $this->faker->words(2, TRUE), 'vid' => 'stanford_person_types', diff --git a/tests/codeception/acceptance/Content/PolicyCest.php b/tests/codeception/acceptance/Content/PolicyCest.php index 5cb1273fe..8dc1dbcf3 100644 --- a/tests/codeception/acceptance/Content/PolicyCest.php +++ b/tests/codeception/acceptance/Content/PolicyCest.php @@ -38,7 +38,7 @@ public function _after(AcceptanceTester $I) { /** * Test field access. */ - protected function footestPolicyAccess(AcceptanceTester $I) { + public function testPolicyAccess(AcceptanceTester $I) { $I->logInWithRole('contributor'); $I->amOnPage('/node/add/stanford_policy'); $I->cantSee('Create a new book'); @@ -71,7 +71,7 @@ protected function footestPolicyAccess(AcceptanceTester $I) { /** * Test book title changes. */ - protected function footestPolicyTitle(AcceptanceTester $I) { + public function testPolicyTitle(AcceptanceTester $I) { $title = $this->faker->words(4, TRUE) . ' foo bar'; $I->logInWithRole('administrator'); $I->amOnPage('/node/add/stanford_policy'); @@ -92,7 +92,7 @@ protected function footestPolicyTitle(AcceptanceTester $I) { * * @group menu_link_weight */ - protected function footestPolicyPathAuto(AcceptanceTester $I) { + public function testPolicyPathAuto(AcceptanceTester $I) { $title = $this->faker->words(4, TRUE) . ' foo bar'; $I->logInWithRole('administrator'); $I->amOnPage('/node/add/stanford_policy'); @@ -163,7 +163,7 @@ protected function footestPolicyPathAuto(AcceptanceTester $I) { * * @group menu_link_weight */ - protected function footestPolicyHeirarcy(AcceptanceTester $I) { + public function testPolicyHeirarcy(AcceptanceTester $I) { $I->logInWithRole('administrator'); $book = $I->createEntity([ 'type' => 'stanford_policy', diff --git a/tests/codeception/acceptance/Content/PublicationsCest.php b/tests/codeception/acceptance/Content/PublicationsCest.php index d374d16d7..aabdd00b5 100644 --- a/tests/codeception/acceptance/Content/PublicationsCest.php +++ b/tests/codeception/acceptance/Content/PublicationsCest.php @@ -33,7 +33,7 @@ public function __construct() { /** * Create a book citation */ - protected function footestBookCitation(AcceptanceTester $I) { + public function testBookCitation(AcceptanceTester $I) { $this->values['term_name'] = $this->faker->words(3, TRUE); $this->values['node_title'] = $this->faker->words(3, TRUE); $term = $I->createEntity([ @@ -63,7 +63,7 @@ protected function footestBookCitation(AcceptanceTester $I) { /** * Test out the list pages. */ - protected function footestAllPublicationListPage(AcceptanceTester $I) { + public function testAllPublicationListPage(AcceptanceTester $I) { $this->testBookCitation($I); $I->amOnPage('/publications'); @@ -87,7 +87,7 @@ protected function footestAllPublicationListPage(AcceptanceTester $I) { /** * Published checkbox should be hidden on term edit pages. */ - protected function footestTermPublishing(AcceptanceTester $I) { + public function testTermPublishing(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $term = $I->createEntity([ 'vid' => 'stanford_publication_topics', @@ -100,7 +100,7 @@ protected function footestTermPublishing(AcceptanceTester $I) { /** * An "Other" publication type should be available. */ - protected function footestOtherPublication(AcceptanceTester $I) { + public function testOtherPublication(AcceptanceTester $I) { $this->values['node_title'] = $this->faker->words(3, TRUE); $I->logInWithRole('site_manager'); $I->amOnPage('/node/add/stanford_publication'); @@ -122,7 +122,7 @@ protected function footestOtherPublication(AcceptanceTester $I) { /** * Publication list should be in date order. */ - protected function footestListSort(AcceptanceTester $I) { + public function testListSort(AcceptanceTester $I) { $this->values['a_node_title'] = 'A' . $this->faker->words(3, TRUE); $this->values['b_node_title'] = 'B' . $this->faker->words(3, TRUE); $this->values['c_node_title'] = 'C' . $this->faker->words(3, TRUE); @@ -185,7 +185,7 @@ protected function footestListSort(AcceptanceTester $I) { * * @group D8CORE-4867 */ - protected function footestPubAuthorPage(AcceptanceTester $I) { + public function testPubAuthorPage(AcceptanceTester $I) { $first_name = $this->faker->firstName; $last_name = $this->faker->lastName; $author_node = $I->createEntity([ @@ -219,7 +219,7 @@ protected function footestPubAuthorPage(AcceptanceTester $I) { /** * Journal citations should include a field for journal publisher. */ - protected function footestJournalPublisher(AcceptanceTester $I) { + public function testJournalPublisher(AcceptanceTester $I) { $term = $I->createEntity([ 'vid' => 'stanford_publication_topics', 'name' => $this->faker->word, diff --git a/tests/codeception/acceptance/Content/SearchBlockCest.php b/tests/codeception/acceptance/Content/SearchBlockCest.php index 6ab236523..573d4f9f5 100644 --- a/tests/codeception/acceptance/Content/SearchBlockCest.php +++ b/tests/codeception/acceptance/Content/SearchBlockCest.php @@ -26,7 +26,7 @@ public function __before() { /** * Site managers should be able to disable the search block. */ - protected function footestHideSearchBlock(AcceptanceTester $I) { + public function testHideSearchBlock(AcceptanceTester $I) { $org_term = $I->createEntity([ 'vid' => 'site_owner_orgs', 'name' => $this->faker->words(2, TRUE), diff --git a/tests/codeception/acceptance/Contrib/ConfigReadonlyCest.php b/tests/codeception/acceptance/Contrib/ConfigReadonlyCest.php index 324c143ba..8e162eeb7 100644 --- a/tests/codeception/acceptance/Contrib/ConfigReadonlyCest.php +++ b/tests/codeception/acceptance/Contrib/ConfigReadonlyCest.php @@ -11,7 +11,7 @@ class ConfigReadonlyCest { /** * Config readonly module should be enabled. */ - protected function footestConfigReadonlyModule(AcceptanceTester $I) { + public function testConfigReadonlyModule(AcceptanceTester $I) { $drush_result = $I->runDrush('pm-list --filter=name=config_readonly --format=json'); $drush_result = json_decode($drush_result, TRUE); $I->assertEquals('Enabled', $drush_result['config_readonly']['status']); diff --git a/tests/codeception/acceptance/Contrib/MenuBlockCest.php b/tests/codeception/acceptance/Contrib/MenuBlockCest.php index 1dcf5a924..972099c92 100644 --- a/tests/codeception/acceptance/Contrib/MenuBlockCest.php +++ b/tests/codeception/acceptance/Contrib/MenuBlockCest.php @@ -23,7 +23,7 @@ public function __construct() { * * @group menu_block */ - protected function footestMenuBlockVisibility(AcceptanceTester $I) { + public function testMenuBlockVisibility(AcceptanceTester $I) { $parent = $I->createEntity([ 'type' => 'stanford_page', 'title' => $this->faker->words(3, TRUE), diff --git a/tests/codeception/acceptance/Contrib/NodeRevisionDeleteCest.php b/tests/codeception/acceptance/Contrib/NodeRevisionDeleteCest.php index d2ffcaadb..60cb34e03 100644 --- a/tests/codeception/acceptance/Contrib/NodeRevisionDeleteCest.php +++ b/tests/codeception/acceptance/Contrib/NodeRevisionDeleteCest.php @@ -24,7 +24,7 @@ public function __construct() { /** * Test that revisions are trimmed after cron runs. */ - protected function footestNodeRevisionDelete(AcceptanceTester $I) { + public function testNodeRevisionDelete(AcceptanceTester $I) { $I->logInWithRole('administrator'); /** @var \Drupal\node\NodeInterface $node */ $node = $I->createEntity([ diff --git a/tests/codeception/acceptance/Contrib/ViewsBulkEditCest.php b/tests/codeception/acceptance/Contrib/ViewsBulkEditCest.php index 2f31ed644..8b4bb079a 100644 --- a/tests/codeception/acceptance/Contrib/ViewsBulkEditCest.php +++ b/tests/codeception/acceptance/Contrib/ViewsBulkEditCest.php @@ -32,7 +32,7 @@ public function __construct() { /** * Bulk editing content changes the field values. */ - protected function footestBulkEdits(AcceptanceTester $I) { + public function testBulkEdits(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $this->createEvents($I); diff --git a/tests/codeception/acceptance/Contrib/XmlsitemapCest.php b/tests/codeception/acceptance/Contrib/XmlsitemapCest.php index 7073eb8b4..85ec58bb4 100644 --- a/tests/codeception/acceptance/Contrib/XmlsitemapCest.php +++ b/tests/codeception/acceptance/Contrib/XmlsitemapCest.php @@ -8,7 +8,7 @@ class XmlsitemapCest { /** * Test that xmlsitemap is having 403 and 404 pages removed. */ - protected function footestStanfordProfileSitemapLinkAlter(AcceptanceTester $I) { + public function testStanfordProfileSitemapLinkAlter(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage("/admin/config/search/xmlsitemap/rebuild"); $I->click('Save configuration'); diff --git a/tests/codeception/acceptance/GlobalMessage/GlobalMessageCest.php b/tests/codeception/acceptance/GlobalMessage/GlobalMessageCest.php index 301894e74..f43393963 100644 --- a/tests/codeception/acceptance/GlobalMessage/GlobalMessageCest.php +++ b/tests/codeception/acceptance/GlobalMessage/GlobalMessageCest.php @@ -20,7 +20,7 @@ public function _after(AcceptanceTester $I) { /** * Test the block exists. */ - protected function footestBlockExists(AcceptanceTester $I) { + public function testBlockExists(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/structure/block'); $I->canSee('Global Messages'); @@ -29,7 +29,7 @@ protected function footestBlockExists(AcceptanceTester $I) { /** * Test the Form exists. */ - protected function footestFormExists(AcceptanceTester $I) { + public function testFormExists(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/global-message'); $I->canSee('Edit config page Global Message'); @@ -38,7 +38,7 @@ protected function footestFormExists(AcceptanceTester $I) { /** * Test the Form Settings. */ - protected function footestFormSettings(AcceptanceTester $I) { + public function testFormSettings(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/global-message'); $I->checkOption('#edit-su-global-msg-enabled-value'); @@ -69,7 +69,7 @@ protected function footestFormSettings(AcceptanceTester $I) { /** * Test user role permissions. */ - protected function footestAdminUserRole(AcceptanceTester $I) { + public function testAdminUserRole(AcceptanceTester $I) { // Admin. $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/global-message'); @@ -80,7 +80,7 @@ protected function footestAdminUserRole(AcceptanceTester $I) { /** * Test user role permissions. */ - protected function footestSiteManagerUserRole(AcceptanceTester $I) { + public function testSiteManagerUserRole(AcceptanceTester $I) { // Site Manager. $I->logInWithRole('site_manager'); $I->amOnPage('/admin/config/system/global-message'); @@ -91,7 +91,7 @@ protected function footestSiteManagerUserRole(AcceptanceTester $I) { /** * Test user role permissions. */ - protected function footestSiteEditorUserRole(AcceptanceTester $I) { + public function testSiteEditorUserRole(AcceptanceTester $I) { // Editor. $I->logInWithRole('site_editor'); $I->amOnPage('/admin/config/system/global-message'); @@ -102,7 +102,7 @@ protected function footestSiteEditorUserRole(AcceptanceTester $I) { /** * Test user role permissions. */ - protected function footestContributorUserRole(AcceptanceTester $I) { + public function testContributorUserRole(AcceptanceTester $I) { // Contributor. $I->logInWithRole('contributor'); $I->amOnPage('/admin/config/system/global-message'); diff --git a/tests/codeception/acceptance/HomePageCest.php b/tests/codeception/acceptance/HomePageCest.php index e8d60d810..d9ffb0a11 100644 --- a/tests/codeception/acceptance/HomePageCest.php +++ b/tests/codeception/acceptance/HomePageCest.php @@ -8,7 +8,7 @@ class HomePageCest { /** * Validate the homepage loads. */ - protected function footestHomepage(AcceptanceTester $I) { + public function testHomepage(AcceptanceTester $I) { $I->amOnPage('/'); $I->canSee('Stanford'); $I->seeCurrentUrlEquals('/'); @@ -21,7 +21,7 @@ protected function footestHomepage(AcceptanceTester $I) { /** * Users can't unpublish the homepage. */ - protected function footestUnpublishingHomepage(AcceptanceTester $I) { + public function testUnpublishingHomepage(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $I->amOnPage('/'); $I->click('Edit', '.tabs'); diff --git a/tests/codeception/acceptance/LocalFooter/LocalFooterCest.php b/tests/codeception/acceptance/LocalFooter/LocalFooterCest.php index 4d5d09a8c..afc47be28 100644 --- a/tests/codeception/acceptance/LocalFooter/LocalFooterCest.php +++ b/tests/codeception/acceptance/LocalFooter/LocalFooterCest.php @@ -22,7 +22,7 @@ public function _after(AcceptanceTester $I) { /** * Only site manager and higher should have access. */ - protected function footestAccess(AcceptanceTester $I) { + public function testAccess(AcceptanceTester $I) { $I->logInWithRole('contributor'); $I->amOnPage('/admin/config/system/local-footer'); $I->canSeeResponseCodeIs(403); @@ -35,7 +35,7 @@ protected function footestAccess(AcceptanceTester $I) { /** * Changes to the local footer should display correctly. */ - protected function footestCustomLocalFooter(AcceptanceTester $I) { + public function testCustomLocalFooter(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $I->amOnPage('/admin/config/system/local-footer'); $I->checkOption('Enabled'); @@ -95,7 +95,7 @@ protected function footestCustomLocalFooter(AcceptanceTester $I) { /** * Content blocks. */ - protected function footestCustomContentLocalFooter(AcceptanceTester $I) { + public function testCustomContentLocalFooter(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/local-footer'); $I->checkOption('Enabled'); @@ -114,7 +114,7 @@ protected function footestCustomContentLocalFooter(AcceptanceTester $I) { /** * Route urls and no link urls should function correctly in the footer. */ - protected function footestNodeRoutesAndNoLink(AcceptanceTester $I) { + public function testNodeRoutesAndNoLink(AcceptanceTester $I) { $node = $I->createEntity([ 'type' => 'stanford_page', 'title' => 'Test Page', diff --git a/tests/codeception/acceptance/LocalFooter/LocalFooterLockupCest.php b/tests/codeception/acceptance/LocalFooter/LocalFooterLockupCest.php index 712cef84b..f020b2262 100644 --- a/tests/codeception/acceptance/LocalFooter/LocalFooterLockupCest.php +++ b/tests/codeception/acceptance/LocalFooter/LocalFooterLockupCest.php @@ -39,7 +39,7 @@ public function _after(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsA(AcceptanceTester $I) { + public function testLockupSettingsA(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/local-footer'); $I->canSeeResponseCodeIs(200); @@ -62,7 +62,7 @@ protected function footestLockupSettingsA(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsB(AcceptanceTester $I) { + public function testLockupSettingsB(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/local-footer'); $I->canSeeResponseCodeIs(200); @@ -85,7 +85,7 @@ protected function footestLockupSettingsB(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsD(AcceptanceTester $I) { + public function testLockupSettingsD(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/local-footer'); $I->canSeeResponseCodeIs(200); @@ -108,7 +108,7 @@ protected function footestLockupSettingsD(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsE(AcceptanceTester $I) { + public function testLockupSettingsE(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/local-footer'); $I->canSeeResponseCodeIs(200); @@ -132,7 +132,7 @@ protected function footestLockupSettingsE(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsH(AcceptanceTester $I) { + public function testLockupSettingsH(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/local-footer'); $I->canSeeResponseCodeIs(200); @@ -156,7 +156,7 @@ protected function footestLockupSettingsH(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsI(AcceptanceTester $I) { + public function testLockupSettingsI(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/local-footer'); $I->canSeeResponseCodeIs(200); @@ -180,7 +180,7 @@ protected function footestLockupSettingsI(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsM(AcceptanceTester $I) { + public function testLockupSettingsM(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/local-footer'); $I->canSeeResponseCodeIs(200); @@ -203,7 +203,7 @@ protected function footestLockupSettingsM(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsO(AcceptanceTester $I) { + public function testLockupSettingsO(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/local-footer'); $I->canSeeResponseCodeIs(200); @@ -225,7 +225,7 @@ protected function footestLockupSettingsO(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsP(AcceptanceTester $I) { + public function testLockupSettingsP(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/local-footer'); $I->canSeeResponseCodeIs(200); @@ -248,7 +248,7 @@ protected function footestLockupSettingsP(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsR(AcceptanceTester $I) { + public function testLockupSettingsR(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/local-footer'); $I->canSeeResponseCodeIs(200); @@ -270,7 +270,7 @@ protected function footestLockupSettingsR(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsS(AcceptanceTester $I) { + public function testLockupSettingsS(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/local-footer'); $I->canSeeResponseCodeIs(200); @@ -294,7 +294,7 @@ protected function footestLockupSettingsS(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsT(AcceptanceTester $I) { + public function testLockupSettingsT(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/local-footer'); $I->canSeeResponseCodeIs(200); @@ -319,7 +319,7 @@ protected function footestLockupSettingsT(AcceptanceTester $I) { /** * Test the logo image settings overrides. */ - protected function footestLogoWithLockup(AcceptanceTester $I) { + public function testLogoWithLockup(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/local-footer'); $I->canSeeResponseCodeIs(200); @@ -354,7 +354,7 @@ protected function footestLogoWithLockup(AcceptanceTester $I) { /** * Test for the logo without the lockup text. */ - protected function footestLogoWithOutLockup(AcceptanceTester $I) { + public function testLogoWithOutLockup(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/local-footer'); $I->canSeeResponseCodeIs(200); diff --git a/tests/codeception/acceptance/LockupSettings/LockupSettingsCest.php b/tests/codeception/acceptance/LockupSettings/LockupSettingsCest.php index 305aa3e82..4d6e839b6 100644 --- a/tests/codeception/acceptance/LockupSettings/LockupSettingsCest.php +++ b/tests/codeception/acceptance/LockupSettings/LockupSettingsCest.php @@ -40,7 +40,7 @@ public function _after(AcceptanceTester $I) { /** * Test the lockup exists. */ - protected function footestLockupSettings(AcceptanceTester $I) { + public function testLockupSettings(AcceptanceTester $I) { $I->amOnPage('/'); $I->seeElement('.su-lockup'); } @@ -48,7 +48,7 @@ protected function footestLockupSettings(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsA(AcceptanceTester $I) { + public function testLockupSettingsA(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/lockup-settings'); $I->canSeeResponseCodeIs(200); @@ -71,7 +71,7 @@ protected function footestLockupSettingsA(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsB(AcceptanceTester $I) { + public function testLockupSettingsB(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/lockup-settings'); $I->canSeeResponseCodeIs(200); @@ -94,7 +94,7 @@ protected function footestLockupSettingsB(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsD(AcceptanceTester $I) { + public function testLockupSettingsD(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/lockup-settings'); $I->canSeeResponseCodeIs(200); @@ -117,7 +117,7 @@ protected function footestLockupSettingsD(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsE(AcceptanceTester $I) { + public function testLockupSettingsE(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/lockup-settings'); $I->canSeeResponseCodeIs(200); @@ -141,7 +141,7 @@ protected function footestLockupSettingsE(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsH(AcceptanceTester $I) { + public function testLockupSettingsH(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/lockup-settings'); $I->canSeeResponseCodeIs(200); @@ -165,7 +165,7 @@ protected function footestLockupSettingsH(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsI(AcceptanceTester $I) { + public function testLockupSettingsI(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/lockup-settings'); $I->canSeeResponseCodeIs(200); @@ -189,7 +189,7 @@ protected function footestLockupSettingsI(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsM(AcceptanceTester $I) { + public function testLockupSettingsM(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/lockup-settings'); $I->canSeeResponseCodeIs(200); @@ -212,7 +212,7 @@ protected function footestLockupSettingsM(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsO(AcceptanceTester $I) { + public function testLockupSettingsO(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/lockup-settings'); $I->canSeeResponseCodeIs(200); @@ -234,7 +234,7 @@ protected function footestLockupSettingsO(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsP(AcceptanceTester $I) { + public function testLockupSettingsP(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/lockup-settings'); $I->canSeeResponseCodeIs(200); @@ -257,7 +257,7 @@ protected function footestLockupSettingsP(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsR(AcceptanceTester $I) { + public function testLockupSettingsR(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/lockup-settings'); $I->canSeeResponseCodeIs(200); @@ -279,7 +279,7 @@ protected function footestLockupSettingsR(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsS(AcceptanceTester $I) { + public function testLockupSettingsS(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/lockup-settings'); $I->canSeeResponseCodeIs(200); @@ -303,7 +303,7 @@ protected function footestLockupSettingsS(AcceptanceTester $I) { /** * Test the lockup settings overrides. */ - protected function footestLockupSettingsT(AcceptanceTester $I) { + public function testLockupSettingsT(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/lockup-settings'); $I->canSeeResponseCodeIs(200); @@ -328,7 +328,7 @@ protected function footestLockupSettingsT(AcceptanceTester $I) { /** * Test the logo image settings overrides. */ - protected function footestLogoWithLockup(AcceptanceTester $I) { + public function testLogoWithLockup(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/lockup-settings'); $I->canSeeResponseCodeIs(200); @@ -363,7 +363,7 @@ protected function footestLogoWithLockup(AcceptanceTester $I) { /** * Test for the logo without the lockup text. */ - protected function footestLogoWithOutLockup(AcceptanceTester $I) { + public function testLogoWithOutLockup(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/lockup-settings'); $I->canSeeResponseCodeIs(200); diff --git a/tests/codeception/acceptance/LockupSettings/LockupSettingsPermsCest.php b/tests/codeception/acceptance/LockupSettings/LockupSettingsPermsCest.php index 6fc84c164..4dd179aaa 100644 --- a/tests/codeception/acceptance/LockupSettings/LockupSettingsPermsCest.php +++ b/tests/codeception/acceptance/LockupSettings/LockupSettingsPermsCest.php @@ -8,7 +8,7 @@ class LockupSettingsPermsCest { /** * Test access to lockup settings overrides. */ - protected function footestSiteManagerRole(AcceptanceTester $I) { + public function testSiteManagerRole(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $I->amOnPage('/admin/config/system/lockup-settings'); $I->canSee('Edit config page Lockup Settings'); @@ -18,7 +18,7 @@ protected function footestSiteManagerRole(AcceptanceTester $I) { /** * Test access to lockup settings overrides. */ - protected function footestContributorRole(AcceptanceTester $I) { + public function testContributorRole(AcceptanceTester $I) { $I->logInWithRole('contributor'); $I->amOnPage('/admin/config/system/lockup-settings'); $I->canSeeResponseCodeIs(403); @@ -27,7 +27,7 @@ protected function footestContributorRole(AcceptanceTester $I) { /** * Test access to lockup settings overrides. */ - protected function footestSiteEditorRole(AcceptanceTester $I) { + public function testSiteEditorRole(AcceptanceTester $I) { $I->logInWithRole('site_editor'); $I->amOnPage('/admin/config/system/lockup-settings'); $I->canSeeResponseCodeIs(403); diff --git a/tests/codeception/acceptance/Media/MediaCest.php b/tests/codeception/acceptance/Media/MediaCest.php index e1cc1a16f..e966fe5bd 100644 --- a/tests/codeception/acceptance/Media/MediaCest.php +++ b/tests/codeception/acceptance/Media/MediaCest.php @@ -28,7 +28,7 @@ public function __construct() { /** * Documents can be embedded as links. */ - protected function footestFileLinks(AcceptanceTester $I) { + public function testFileLinks(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/content/linkit/manage/default/matchers'); $I->canSee('Metadata: [media:field_media_file:entity:basename]: [media:field_media_file:entity:mime]'); @@ -37,7 +37,7 @@ protected function footestFileLinks(AcceptanceTester $I) { /** * Media Types Exist. */ - protected function footestForMediaTypes(AcceptanceTester $I) { + public function testForMediaTypes(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/structure/media'); $I->canSee('Embeddable'); @@ -50,7 +50,7 @@ protected function footestForMediaTypes(AcceptanceTester $I) { /** * Embedded media should not have a tag. */ - protected function footestSourceTag(AcceptanceTester $I) { + public function testSourceTag(AcceptanceTester $I) { /** @var \Drupal\Core\File\FileSystemInterface $file_system */ $file_system = \Drupal::service('file_system'); $image_path = $file_system->copy(__DIR__ . '/../assets/logo.jpg', 'public://' . $this->faker->word . '.jpg'); @@ -89,7 +89,7 @@ protected function footestSourceTag(AcceptanceTester $I) { /** * Embeddable types enabled. */ - protected function footestForEmbeddableOptions(AcceptanceTester $I) { + public function testForEmbeddableOptions(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/structure/media/manage/embeddable'); $I->canSeeCheckboxIsChecked('ArcGIS StoryMaps'); @@ -115,7 +115,7 @@ protected function footestForEmbeddableOptions(AcceptanceTester $I) { /** * Embeddable fields set right. */ - protected function footestForEmbeddableFields(AcceptanceTester $I) { + public function testForEmbeddableFields(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/structure/media/manage/embeddable'); $I->seeOptionIsSelected('Field for unstructured embed codes', 'media.field_media_embeddable_code'); @@ -124,7 +124,7 @@ protected function footestForEmbeddableFields(AcceptanceTester $I) { /** * Embeddable form fields. */ - protected function footestForEmbeddableFormFields(AcceptanceTester $I) { + public function testForEmbeddableFormFields(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/media/add/embeddable'); $I->canSee('Name'); @@ -154,7 +154,7 @@ protected function footestForEmbeddableFormFields(AcceptanceTester $I) { * * @group embed-codes */ - protected function footestAllowedEmbedCodes(AcceptanceTester $I) { + public function testAllowedEmbedCodes(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $I->amOnPage('/media/add/embeddable'); $I->fillField('Name', $this->faker->words(3, TRUE)); @@ -186,7 +186,7 @@ protected function footestAllowedEmbedCodes(AcceptanceTester $I) { /** * Google Form additional field */ - protected function footestForGoogleFormFields(AcceptanceTester $I) { + public function testForGoogleFormFields(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $I->amOnPage('/media/add/google_form'); $I->canSee('Form Height'); @@ -195,7 +195,7 @@ protected function footestForGoogleFormFields(AcceptanceTester $I) { /** * Administrative file listing can delete files. */ - protected function footestDeleteFiles(AcceptanceTester $I) { + public function testDeleteFiles(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $I->amOnPage('/admin/content/files'); $I->canSeeResponseCodeIs(403); @@ -256,7 +256,7 @@ protected function footestDeleteFiles(AcceptanceTester $I) { /** * SUL Embeddables can be saved. */ - protected function footestArcGis(AcceptanceTester $I) { + public function testArcGis(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/media/add/embeddable'); $name = $this->faker->words(2, TRUE); @@ -269,7 +269,7 @@ protected function footestArcGis(AcceptanceTester $I) { /** * Test media category taxonomy field. */ - protected function footestCategoryField(AcceptanceTester $I) { + public function testCategoryField(AcceptanceTester $I) { /** @var \Drupal\Core\File\FileSystemInterface $file_system */ $file_system = \Drupal::service('file_system'); $image_path = $file_system->copy(__DIR__ . '/../assets/logo.jpg', 'public://' . $this->faker->word . '.jpg'); diff --git a/tests/codeception/acceptance/Media/MediaFormsCest.php b/tests/codeception/acceptance/Media/MediaFormsCest.php index 74456b9c1..c28d83a3b 100644 --- a/tests/codeception/acceptance/Media/MediaFormsCest.php +++ b/tests/codeception/acceptance/Media/MediaFormsCest.php @@ -22,7 +22,7 @@ public function __construct() { /** * Test embeddables form alters */ - protected function footestFormAlters(AcceptanceTester $I) { + public function testFormAlters(AcceptanceTester $I) { $support_url = 'https://stanford.service-now.com/it_services?id=sc_cat_item&sys_id=83daed294f4143009a9a97411310c70a'; $I->logInWithRole('site_manager'); $I->amOnPage('/media/add/embeddable'); diff --git a/tests/codeception/acceptance/Media/MediaPermissionsCest.php b/tests/codeception/acceptance/Media/MediaPermissionsCest.php index 3c192c69f..79ef6ae4e 100644 --- a/tests/codeception/acceptance/Media/MediaPermissionsCest.php +++ b/tests/codeception/acceptance/Media/MediaPermissionsCest.php @@ -22,7 +22,7 @@ public function __construct() { /** * Test admin perms */ - protected function footestAdminPerms(AcceptanceTester $I) { + public function testAdminPerms(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/media/add/embeddable'); $I->canSeeResponseCodeIs(200); @@ -33,7 +33,7 @@ protected function footestAdminPerms(AcceptanceTester $I) { /** * Test site embedder perms */ - protected function footestSiteEmbedderPerms(AcceptanceTester $I) { + public function testSiteEmbedderPerms(AcceptanceTester $I) { $user = $I->createUserWithRoles(['su_site_embedder', 'site_manager']); $I->logInAs($user->getAccountName()); $I->amOnPage('/media/add/embeddable'); @@ -45,7 +45,7 @@ protected function footestSiteEmbedderPerms(AcceptanceTester $I) { /** * Test site manager perms */ - protected function footestSiteManagerPerms(AcceptanceTester $I) { + public function testSiteManagerPerms(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $I->amOnPage('/media/add/embeddable'); $I->canSeeResponseCodeIs(200); @@ -68,7 +68,7 @@ protected function footestSiteManagerPerms(AcceptanceTester $I) { /** * Test site editor perms */ - protected function footestSiteEditorPerms(AcceptanceTester $I) { + public function testSiteEditorPerms(AcceptanceTester $I) { $I->logInWithRole('site_editor'); $I->amOnPage('/media/add/embeddable'); $I->canSeeResponseCodeIs(200); @@ -84,7 +84,7 @@ protected function footestSiteEditorPerms(AcceptanceTester $I) { /** * Test contributor perms */ - protected function footestContributorPerms(AcceptanceTester $I) { + public function testContributorPerms(AcceptanceTester $I) { $I->logInWithRole('contributor'); $I->amOnPage('/media/add/embeddable'); $I->canSeeResponseCodeIs(200); diff --git a/tests/codeception/acceptance/Paragraphs/Issue2901390Cest.php b/tests/codeception/acceptance/Paragraphs/Issue2901390Cest.php index 2b378fa7c..f2f2d401c 100644 --- a/tests/codeception/acceptance/Paragraphs/Issue2901390Cest.php +++ b/tests/codeception/acceptance/Paragraphs/Issue2901390Cest.php @@ -27,7 +27,7 @@ public function __construct() { /** * A user should be able to create a custom block in layout builder. */ - protected function footestLayoutBuilderParagraph(AcceptanceTester $I) { + public function testLayoutBuilderParagraph(AcceptanceTester $I) { $user = $I->createUserWithRoles(['site_manager', 'layout_builder_user']); $I->logInAs($user->id()); $node = $I->createEntity([ diff --git a/tests/codeception/acceptance/Paragraphs/ListsCest.php b/tests/codeception/acceptance/Paragraphs/ListsCest.php index 724cabdbe..ea55564c8 100644 --- a/tests/codeception/acceptance/Paragraphs/ListsCest.php +++ b/tests/codeception/acceptance/Paragraphs/ListsCest.php @@ -29,7 +29,7 @@ public function __construct() { * * @group jsonapi */ - protected function footestSharedTags(AcceptanceTester $I) { + public function testSharedTags(AcceptanceTester $I) { $shared_tag = $I->createEntity([ 'name' => $this->faker->jobTitle, 'vid' => 'su_shared_tags', @@ -135,7 +135,7 @@ protected function footestSharedTags(AcceptanceTester $I) { * * @group jsonapi */ - protected function footestListParagraphNews(AcceptanceTester $I) { + public function testListParagraphNews(AcceptanceTester $I) { $I->logInWithRole('contributor'); $I->amOnPage('/node/add/stanford_news'); $title = $this->faker->words(3, TRUE); @@ -170,7 +170,7 @@ protected function footestListParagraphNews(AcceptanceTester $I) { * * @group jsonapi */ - protected function footestListParagraphNewsFiltersNoFilter(AcceptanceTester $I) { + public function testListParagraphNewsFiltersNoFilter(AcceptanceTester $I) { $I->logInWithRole('contributor'); $topic_term = $this->createTaxonomyTerm($I, 'stanford_news_topics'); @@ -198,7 +198,7 @@ protected function footestListParagraphNewsFiltersNoFilter(AcceptanceTester $I) /** * When using the list paragraph and view arguments, it should filter results. */ - protected function footestListParagraphNewsFiltersRandomFilter(AcceptanceTester $I) { + public function testListParagraphNewsFiltersRandomFilter(AcceptanceTester $I) { $I->logInWithRole('contributor'); $random_term = $this->createTaxonomyTerm($I, 'stanford_news_topics'); @@ -228,7 +228,7 @@ protected function footestListParagraphNewsFiltersRandomFilter(AcceptanceTester /** * When using the list paragraph and view arguments, it should filter results. */ - protected function footestListParagraphNewsFiltersTopicFilter(AcceptanceTester $I) { + public function testListParagraphNewsFiltersTopicFilter(AcceptanceTester $I) { $I->logInWithRole('contributor'); $topic_term = $this->createTaxonomyTerm($I, 'stanford_news_topics'); @@ -262,7 +262,7 @@ protected function footestListParagraphNewsFiltersTopicFilter(AcceptanceTester $ * * @group D8CORE-4858 */ - protected function footestEmptyResultsListEvents(AcceptanceTester $I) { + public function testEmptyResultsListEvents(AcceptanceTester $I) { // Start with no events. $nodes = \Drupal::entityTypeManager() ->getStorage('node') @@ -374,7 +374,7 @@ protected function footestEmptyResultsListEvents(AcceptanceTester $I) { * * @group jsonapi */ - protected function footestListParagraphEvents(AcceptanceTester $I) { + public function testListParagraphEvents(AcceptanceTester $I) { $I->logInWithRole('contributor'); $type = $I->createEntity([ @@ -498,7 +498,7 @@ protected function footestListParagraphEvents(AcceptanceTester $I) { /** * When using the list paragraph and view arguments, it should filter results. */ - protected function footestListParagraphEventFiltersNoFilter(AcceptanceTester $I) { + public function testListParagraphEventFiltersNoFilter(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $event_type = $this->createTaxonomyTerm($I, 'stanford_event_types'); @@ -531,7 +531,7 @@ protected function footestListParagraphEventFiltersNoFilter(AcceptanceTester $I) /** * When using the list paragraph and view arguments, it should filter results. */ - protected function footestListParagraphEventFiltersRandomFilter(AcceptanceTester $I) { + public function testListParagraphEventFiltersRandomFilter(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $random_term = $this->createTaxonomyTerm($I, 'stanford_event_types'); @@ -566,7 +566,7 @@ protected function footestListParagraphEventFiltersRandomFilter(AcceptanceTester /** * When using the list paragraph and view arguments, it should filter results. */ - protected function footestListParagraphEventFiltersTypeFilter(AcceptanceTester $I) { + public function testListParagraphEventFiltersTypeFilter(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $event_type = $this->createTaxonomyTerm($I, 'stanford_event_types'); @@ -603,7 +603,7 @@ protected function footestListParagraphEventFiltersTypeFilter(AcceptanceTester $ /** * When using the list paragraph and view arguments, it should filter results. */ - protected function footestListParagraphEventFiltersAudienceFilter(AcceptanceTester $I) { + public function testListParagraphEventFiltersAudienceFilter(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $event_type = $this->createTaxonomyTerm($I, 'stanford_event_types'); @@ -640,7 +640,7 @@ protected function footestListParagraphEventFiltersAudienceFilter(AcceptanceTest /** * People items should display in the list paragraph. */ - protected function footestListParagraphPeople(AcceptanceTester $I) { + public function testListParagraphPeople(AcceptanceTester $I) { $I->logInWithRole('contributor'); $I->amOnPage('/node/add/stanford_person'); $I->fillField('First Name', 'Foo'); @@ -664,7 +664,7 @@ protected function footestListParagraphPeople(AcceptanceTester $I) { /** * When using the list paragraph and view arguments, it should filter results. */ - protected function footestListParagraphPeopleFilters(AcceptanceTester $I) { + public function testListParagraphPeopleFilters(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $type_term = $this->createTaxonomyTerm($I, 'stanford_person_types'); @@ -692,7 +692,7 @@ protected function footestListParagraphPeopleFilters(AcceptanceTester $I) { /** * When using the list paragraph and view arguments, it should filter results. */ - protected function footestListParagraphPeopleFiltersRandomFilter(AcceptanceTester $I) { + public function testListParagraphPeopleFiltersRandomFilter(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $random_term = $this->createTaxonomyTerm($I, 'stanford_person_types'); @@ -722,7 +722,7 @@ protected function footestListParagraphPeopleFiltersRandomFilter(AcceptanceTeste /** * When using the list paragraph and view arguments, it should filter results. */ - protected function footestListParagraphPeopleFiltersTypeFilter(AcceptanceTester $I) { + public function testListParagraphPeopleFiltersTypeFilter(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $type_term = $this->createTaxonomyTerm($I, 'stanford_person_types'); @@ -754,7 +754,7 @@ protected function footestListParagraphPeopleFiltersTypeFilter(AcceptanceTester /** * Test basic page types list view. */ - protected function footestListParagraphBasicPageTypesFilter(AcceptanceTester $I) { + public function testListParagraphBasicPageTypesFilter(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $type_term = $this->createTaxonomyTerm($I, 'basic_page_types', 'Basic Page Test Term'); diff --git a/tests/codeception/acceptance/Paragraphs/MediaWithCaptionCest.php b/tests/codeception/acceptance/Paragraphs/MediaWithCaptionCest.php index dd48f621f..1d622823a 100644 --- a/tests/codeception/acceptance/Paragraphs/MediaWithCaptionCest.php +++ b/tests/codeception/acceptance/Paragraphs/MediaWithCaptionCest.php @@ -27,7 +27,7 @@ public function __construct() { /** * A media with caption paragraph will display its fields. */ - protected function footestMediaParagraph(AcceptanceTester $I) { + public function testMediaParagraph(AcceptanceTester $I) { $paragraph = $I->createEntity([ 'type' => 'stanford_media_caption', 'su_media_caption_caption' => 'This is a super caption', diff --git a/tests/codeception/acceptance/Paragraphs/StanfordCardCest.php b/tests/codeception/acceptance/Paragraphs/StanfordCardCest.php index 95202bd3b..78b90007a 100644 --- a/tests/codeception/acceptance/Paragraphs/StanfordCardCest.php +++ b/tests/codeception/acceptance/Paragraphs/StanfordCardCest.php @@ -24,7 +24,7 @@ public function __construct() { /** * Test a card with a button link. */ - protected function footestCardButtonLinkText(\AcceptanceTester $I) { + public function testCardButtonLinkText(\AcceptanceTester $I) { $node = $this->createNodeWithLink($I); $I->amOnPage($node->toUrl()->toString()); $I->canSeeLink('It\'s a "test" link & title', 'http://google.com'); @@ -33,7 +33,7 @@ protected function footestCardButtonLinkText(\AcceptanceTester $I) { /** * Test a card with an action link. */ - protected function footestCardActionLinkText(\AcceptanceTester $I) { + public function testCardActionLinkText(\AcceptanceTester $I) { $node = $this->createNodeWithLink($I, 'action'); $I->amOnPage($node->toUrl()->toString()); $I->canSeeLink('It\'s a "test" link & title', 'http://google.com'); diff --git a/tests/codeception/acceptance/SubThemeCest.php b/tests/codeception/acceptance/SubThemeCest.php index 704bc6348..c18abc20f 100644 --- a/tests/codeception/acceptance/SubThemeCest.php +++ b/tests/codeception/acceptance/SubThemeCest.php @@ -63,7 +63,7 @@ public function _after(AcceptanceTester $I) { * * @group minimal-subtheme-test2 */ - protected function footestSubTheme(AcceptanceTester $I) { + public function testSubTheme(AcceptanceTester $I) { $I->runDrush('theme:enable -y ' . strtolower($this->themeName)); $I->logInWithRole('administrator'); $I->amOnPage('/admin/appearance'); @@ -94,7 +94,7 @@ protected function footestSubTheme(AcceptanceTester $I) { * * @group minimal-subtheme-test */ - protected function footestMinimalSubtheme(AcceptanceTester $I) { + public function testMinimalSubtheme(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/appearance'); $I->click('Set as default', 'a[title="Set Stanford Minimally Branded Subtheme as default theme"]'); diff --git a/tests/codeception/acceptance/SuperFooter/SuperFooterCest.php b/tests/codeception/acceptance/SuperFooter/SuperFooterCest.php index 186c0f5fe..2fe60f607 100644 --- a/tests/codeception/acceptance/SuperFooter/SuperFooterCest.php +++ b/tests/codeception/acceptance/SuperFooter/SuperFooterCest.php @@ -17,7 +17,7 @@ public function _after(AcceptanceTester $I) { /** * Test the block exists. */ - protected function footestBlockExists(AcceptanceTester $I) { + public function testBlockExists(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/structure/block'); $I->canSee('Super Footer'); @@ -26,7 +26,7 @@ protected function footestBlockExists(AcceptanceTester $I) { /** * Test the Form exists. */ - protected function footestFormExists(AcceptanceTester $I) { + public function testFormExists(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/super-footer'); $I->canSee('Edit config page Super Footer'); @@ -35,7 +35,7 @@ protected function footestFormExists(AcceptanceTester $I) { /** * Test the Form Settings. */ - protected function footestFormSettings(AcceptanceTester $I) { + public function testFormSettings(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/super-footer'); $I->checkOption('#edit-su-super-foot-enabled-value'); @@ -60,7 +60,7 @@ protected function footestFormSettings(AcceptanceTester $I) { /** * Test user role permissions. */ - protected function footestAdminUserRole(AcceptanceTester $I) { + public function testAdminUserRole(AcceptanceTester $I) { // Admin. $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/system/super-footer'); @@ -71,7 +71,7 @@ protected function footestAdminUserRole(AcceptanceTester $I) { /** * Test user role permissions. */ - protected function footestSiteManagerUserRole(AcceptanceTester $I) { + public function testSiteManagerUserRole(AcceptanceTester $I) { // Site Manager. $I->logInWithRole('site_manager'); $I->amOnPage('/admin/config/system/super-footer'); @@ -82,7 +82,7 @@ protected function footestSiteManagerUserRole(AcceptanceTester $I) { /** * Test user role permissions. */ - protected function footestSiteEditorUserRole(AcceptanceTester $I) { + public function testSiteEditorUserRole(AcceptanceTester $I) { // Editor. $I->logInWithRole('site_editor'); $I->amOnPage('/admin/config/system/super-footer'); @@ -93,7 +93,7 @@ protected function footestSiteEditorUserRole(AcceptanceTester $I) { /** * Test user role permissions. */ - protected function footestContributorUserRole(AcceptanceTester $I) { + public function testContributorUserRole(AcceptanceTester $I) { // Contributor. $I->logInWithRole('contributor'); $I->amOnPage('/admin/config/system/super-footer'); diff --git a/tests/codeception/acceptance/SystemCest.php b/tests/codeception/acceptance/SystemCest.php index aa6872bb0..7a37cb576 100644 --- a/tests/codeception/acceptance/SystemCest.php +++ b/tests/codeception/acceptance/SystemCest.php @@ -10,7 +10,8 @@ class SystemCest { /** * Test the site status report. */ - protected function footestSiteStatus(AcceptanceTester $I) { + public function testSiteStatus(AcceptanceTester $I) { + $I->runDrush('xmlsitemap:rebuild'); $I->logInWithRole('administrator'); $I->amOnPage('/admin/reports/status'); $I->canSee('10.1', '.system-status-general-info'); diff --git a/tests/codeception/acceptance/SystemSiteConfigCest.php b/tests/codeception/acceptance/SystemSiteConfigCest.php index efe61f35e..5d729ce22 100644 --- a/tests/codeception/acceptance/SystemSiteConfigCest.php +++ b/tests/codeception/acceptance/SystemSiteConfigCest.php @@ -36,7 +36,7 @@ public function __after(AcceptanceTester $I) { /** * The site manager should be able to change the site name. */ - protected function footestBasicSiteSettings(AcceptanceTester $I) { + public function testBasicSiteSettings(AcceptanceTester $I) { $org_term = $I->createEntity([ 'vid' => 'site_owner_orgs', 'name' => $this->faker->words(2, TRUE), @@ -71,7 +71,7 @@ protected function footestBasicSiteSettings(AcceptanceTester $I) { /** * Site settings config should change the home, 404, and 403 pages. */ - protected function footestSitePages(AcceptanceTester $I) { + public function testSitePages(AcceptanceTester $I) { $org_term = $I->createEntity([ 'vid' => 'site_owner_orgs', 'name' => $this->faker->words(2, TRUE), diff --git a/tests/codeception/acceptance/TextFormatsCest.php b/tests/codeception/acceptance/TextFormatsCest.php index 03fe8875a..464ad3e2f 100644 --- a/tests/codeception/acceptance/TextFormatsCest.php +++ b/tests/codeception/acceptance/TextFormatsCest.php @@ -10,7 +10,7 @@ class TextFormatsCest { /** * Basic HTML should have certain configs set. */ - protected function footestBasicHtml(AcceptanceTester $I) { + public function testBasicHtml(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/config/content/formats/manage/stanford_html'); $I->canSeeCheckboxIsChecked('Large (480px wide, un-cropped)'); diff --git a/tests/codeception/acceptance/Users/DefaultUsersCest.php b/tests/codeception/acceptance/Users/DefaultUsersCest.php index f94890f9b..9ea8f0d5c 100644 --- a/tests/codeception/acceptance/Users/DefaultUsersCest.php +++ b/tests/codeception/acceptance/Users/DefaultUsersCest.php @@ -10,7 +10,7 @@ class DefaultUsersCest { /** * Default users should be created. */ - protected function footestDefaultUsers(AcceptanceTester $I) { + public function testDefaultUsers(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/users'); $I->canSee('Alex'); diff --git a/tests/codeception/acceptance/Users/IntranetCest.php b/tests/codeception/acceptance/Users/IntranetCest.php index c0b7ca014..44a452263 100644 --- a/tests/codeception/acceptance/Users/IntranetCest.php +++ b/tests/codeception/acceptance/Users/IntranetCest.php @@ -46,7 +46,7 @@ public function _after(AcceptanceTester $I) { /** * Simple full site access check. */ - protected function footestIntranet(AcceptanceTester $I) { + public function testIntranet(AcceptanceTester $I) { if (!$this->intranetWasEnabled) { $I->runDrush('sset stanford_intranet 1'); $I->runDrush('cache-rebuild'); @@ -67,7 +67,7 @@ protected function footestIntranet(AcceptanceTester $I) { /** * Test the access of content. */ - protected function footestAccess(AcceptanceTester $I) { + public function testAccess(AcceptanceTester $I) { // Contributors can't set access restrictions. $I->runDrush('sset stanford_intranet 0'); $I->logInWithRole('contributor'); @@ -115,7 +115,7 @@ protected function footestAccess(AcceptanceTester $I) { /** * Content should be indexed and results displayed. */ - protected function footestSearchResults(AcceptanceTester $I) { + public function testSearchResults(AcceptanceTester $I) { $I->runDrush('sset stanford_intranet 1'); $I->runDrush('sapi-c'); $quote = 'Life is like a box of chocolates. You never know what you’re going to get.'; @@ -147,7 +147,7 @@ protected function footestSearchResults(AcceptanceTester $I) { /** * Files can only be added when allow_file_uploads state is enabled. */ - protected function footestMediaAccess(AcceptanceTester $I) { + public function testMediaAccess(AcceptanceTester $I) { $I->runDrush('sset stanford_intranet 1'); $I->runDrush('sset stanford_intranet.allow_file_uploads 1'); diff --git a/tests/codeception/acceptance/Users/RolesCest.php b/tests/codeception/acceptance/Users/RolesCest.php index cf3b76675..abb39307e 100644 --- a/tests/codeception/acceptance/Users/RolesCest.php +++ b/tests/codeception/acceptance/Users/RolesCest.php @@ -10,7 +10,7 @@ class RolesCest { /** * Default roles should exist. */ - protected function footestRolesExist(AcceptanceTester $I) { + public function testRolesExist(AcceptanceTester $I) { $I->logInWithRole('administrator'); $I->amOnPage('/admin/users/roles'); $I->canSee('Contributor'); @@ -25,7 +25,7 @@ protected function footestRolesExist(AcceptanceTester $I) { /** * Stanford Staff role should be very limited. */ - protected function footestStaffRole(AcceptanceTester $I) { + public function testStaffRole(AcceptanceTester $I) { $I->logInWithRole('stanford_staff'); // D8CORE-2538 Staff and students without additional roles shouldn't see // the admin toolbar. @@ -36,7 +36,7 @@ protected function footestStaffRole(AcceptanceTester $I) { /** * Stanford Staff role should be very limited. */ - protected function footestStudentRole(AcceptanceTester $I) { + public function testStudentRole(AcceptanceTester $I) { $I->logInWithRole('stanford_student'); // D8CORE-2538 Staff and students without additional roles shouldn't see // the admin toolbar. @@ -47,7 +47,7 @@ protected function footestStudentRole(AcceptanceTester $I) { /** * Stanford Staff role should be very limited. */ - protected function footestFacultyRole(AcceptanceTester $I) { + public function testFacultyRole(AcceptanceTester $I) { $I->logInWithRole('stanford_faculty'); // D8CORE-2538 Staff and students without additional roles shouldn't see // the admin toolbar. @@ -58,7 +58,7 @@ protected function footestFacultyRole(AcceptanceTester $I) { /** * Contributor role should have some access. */ - protected function footestContributorRole(AcceptanceTester $I) { + public function testContributorRole(AcceptanceTester $I) { $I->logInWithRole('contributor'); $I->amOnPage('/node/add/stanford_page'); @@ -91,7 +91,7 @@ protected function footestContributorRole(AcceptanceTester $I) { /** * Site editor role should have some access. */ - protected function footestSiteEditorRole(AcceptanceTester $I) { + public function testSiteEditorRole(AcceptanceTester $I) { $I->logInWithRole('site_editor'); $I->amOnPage('/node/add/stanford_page'); @@ -124,7 +124,7 @@ protected function footestSiteEditorRole(AcceptanceTester $I) { /** * Site manager should have more access. */ - protected function footestSiteManagerRole(AcceptanceTester $I) { + public function testSiteManagerRole(AcceptanceTester $I) { $I->logInWithRole('site_manager'); $I->amOnPage('/node/add/stanford_page'); @@ -158,7 +158,7 @@ protected function footestSiteManagerRole(AcceptanceTester $I) { /** * Site builder will get more access than site manager. */ - protected function footestSiteBuilderRole(AcceptanceTester $I) { + public function testSiteBuilderRole(AcceptanceTester $I) { $I->logInWithRole('site_builder'); $I->amOnPage('/node/add/stanford_page'); @@ -179,7 +179,7 @@ protected function footestSiteBuilderRole(AcceptanceTester $I) { /** * Developers have the most access. */ - protected function footestSiteDeveloperRole(AcceptanceTester $I) { + public function testSiteDeveloperRole(AcceptanceTester $I) { $I->logInWithRole('site_developer'); $I->amOnPage('/node/add/stanford_page');