Skip to content
Snippets Groups Projects
Commit fa54f53f authored by catch's avatar catch
Browse files

Issue #3281449 by longwave, nod_, deviantintegral: Update Core unit tests to...

Issue #3281449 by longwave, nod_, deviantintegral: Update Core unit tests to not use Bartik and Seven

(cherry picked from commit 5645eeba)
parent 77560248
No related branches found
No related tags found
24 merge requests!8506Draft: Issue #3456536 by ibrahim tameme,!5646Issue #3350972 by nod_: [random test failure]...,!5600Issue #3350972 by nod_: [random test failure]...,!5343Issue #3305066 by quietone, Rename RedirectLeadingSlashesSubscriber,!4350Issue #3307718: Implement xxHash for non-cryptographic use-cases,!3603#ISSUE 3346218 Add a different message on edit comment,!3555Issue #2473873: Views entity operations lack cacheability support, resulting in incorrect dropbuttons,!3494Issue #3327018 by Spokje, longwave, xjm, mondrake: Update PHPStan to 1.9.3 and...,!3410Issue #3340128: UserLoginForm::submitForm has some dead code,!3389Issue #3325184 by Spokje, andypost, xjm, smustgrave: $this->configFactory is...,!3381Issue #3332363: Refactor Claro's menus-and-lists stylesheet,!3307Issue #3326193: CKEditor 5 can grow past the viewport when there is a lot of content,!3236Issue #3332419: Refactor Claro's messages stylesheet,!3231Draft: Issue #3049525 by longwave, fougere, larowlan, kim.pepper, AaronBauman, Wim...,!3212Issue #3294003: Refactor Claro's entity-meta stylesheet,!3194Issue #3330981: Fix PHPStan L1 error "Relying on entity queries to check access by default is deprecated...",!3143Issue #3313342: [PHP 8.1] Deprecated function: strpos(): Passing null to parameter #1 LayoutBuilderUiCacheContext.php on line 28,!3024Issue #3307509: Empty option for views bulk form,!2972Issue #1845004: Replace custom password hashing library with PHP 5.5 password_hash(),!2719Issue #3110137: Remove Classy from core.,!2688Issue #3261452: [PP-1] Remove tracker module from core,!2437Issue #3238257 by hooroomoo, Wim Leers: Fragment link pointing to <textarea>...,!2296Issue #3100732: Allow specifying `meta` data on JSON:API objects,!1626Issue #3256642: Make life better for database drivers that extend another database driver
......@@ -86,9 +86,6 @@ protected function setUp(): void {
$active_theme = $this->getMockBuilder('\Drupal\Core\Theme\ActiveTheme')
->disableOriginalConstructor()
->getMock();
$active_theme->expects($this->any())
->method('getName')
->willReturn('bartik');
$this->themeManager->expects($this->any())
->method('getActiveTheme')
->willReturn($active_theme);
......
......@@ -81,7 +81,7 @@ public function testGrouper() {
'type' => 'file',
'weight' => 0.001,
'preprocess' => TRUE,
'data' => 'core/themes/bartik/css/base/elements.css',
'data' => 'core/themes/example/css/base/elements.css',
'basename' => 'elements.css',
],
'print.css' => [
......@@ -90,7 +90,7 @@ public function testGrouper() {
'type' => 'file',
'weight' => 0.003,
'preprocess' => TRUE,
'data' => 'core/themes/bartik/css/print.css',
'data' => 'core/themes/example/css/print.css',
'basename' => 'print.css',
],
];
......
......@@ -311,12 +311,12 @@ public function testStarterKitFlag(): void {
'--name="Test custom starterkit theme"',
'--description="Custom theme generated from a starterkit theme"',
'--starterkit',
'bartik',
'olivero',
];
$process = new Process($install_command, NULL);
$process->setTimeout(60);
$result = $process->run();
$this->assertStringContainsString('Theme source theme bartik is not a valid starter kit.', trim($process->getErrorOutput()));
$this->assertStringContainsString('Theme source theme olivero is not a valid starter kit.', trim($process->getErrorOutput()));
$this->assertSame(1, $result);
}
......
......@@ -141,13 +141,6 @@ protected function populateFilesystemStructure(array &$filesystem_structure) {
'core/modules/user/user.info.yml' => [],
'profiles/other_profile/modules/other_profile_nested_module/other_profile_nested_module.info.yml' => [],
'core/modules/system/system.info.yml' => [],
'core/themes/seven/seven.info.yml' => [
'type' => 'theme',
],
// Override the core instance of the 'seven' theme.
'sites/default/themes/seven/seven.info.yml' => [
'type' => 'theme',
],
'modules/devel/devel.info.yml' => [],
'modules/poorly_placed_theme/poorly_placed_theme.info.yml' => [
'type' => 'theme',
......
......@@ -80,18 +80,18 @@ public function testRebuildThemeData() {
$this->themeList->expects($this->once())
->method('getList')
->will($this->returnValue([
'seven' => new Extension($this->root, 'theme', 'core/themes/seven/seven.info.yml', 'seven.theme'),
'stark' => new Extension($this->root, 'theme', 'core/themes/stark/stark.info.yml', 'stark.theme'),
]));
$theme_data = $this->themeHandler->rebuildThemeData();
$this->assertCount(1, $theme_data);
$info = $theme_data['seven'];
$info = $theme_data['stark'];
// Ensure some basic properties.
$this->assertInstanceOf('Drupal\Core\Extension\Extension', $info);
$this->assertEquals('seven', $info->getName());
$this->assertEquals('core/themes/seven/seven.info.yml', $info->getPathname());
$this->assertEquals('core/themes/seven/seven.theme', $info->getExtensionPathname());
$this->assertEquals('stark', $info->getName());
$this->assertEquals('core/themes/stark/stark.info.yml', $info->getPathname());
$this->assertEquals('core/themes/stark/stark.theme', $info->getExtensionPathname());
}
......
......@@ -45,7 +45,7 @@ protected function setUp(): void {
parent::setUp();
$this->tokenGenerator = $this->prophesize(CsrfTokenGenerator::class);
$config_factory = $this->getConfigFactoryStub(['system.theme' => ['default' => 'bartik']]);
$config_factory = $this->getConfigFactoryStub(['system.theme' => ['default' => 'stark']]);
$this->requestStack = new RequestStack();
$this->negotiator = new AjaxBasePageNegotiator($this->tokenGenerator->reveal(), $config_factory, $this->requestStack);
}
......@@ -68,8 +68,8 @@ public function providerTestApplies() {
$data = [];
$data['empty'] = [[], FALSE];
$data['no_theme'] = [['ajax_page_state' => ['theme' => '', 'theme_token' => '']], FALSE];
$data['valid_theme_empty_theme_token'] = [['ajax_page_state' => ['theme' => 'seven', 'theme_token' => '']], TRUE];
$data['valid_theme_valid_theme_token'] = [['ajax_page_state' => ['theme' => 'seven', 'theme_token' => 'valid_theme_token']], TRUE];
$data['valid_theme_empty_theme_token'] = [['ajax_page_state' => ['theme' => 'claro', 'theme_token' => '']], TRUE];
$data['valid_theme_valid_theme_token'] = [['ajax_page_state' => ['theme' => 'claro', 'theme_token' => 'valid_theme_token']], TRUE];
return $data;
}
......@@ -77,7 +77,7 @@ public function providerTestApplies() {
* @covers ::determineActiveTheme
*/
public function testDetermineActiveThemeValidToken() {
$theme = 'seven';
$theme = 'claro';
$theme_token = 'valid_theme_token';
$request = new Request([], ['ajax_page_state' => ['theme' => $theme, 'theme_token' => $theme_token]]);
......@@ -95,7 +95,7 @@ public function testDetermineActiveThemeValidToken() {
* @covers ::determineActiveTheme
*/
public function testDetermineActiveThemeInvalidToken() {
$theme = 'seven';
$theme = 'claro';
$theme_token = 'invalid_theme_token';
$request = new Request([], ['ajax_page_state' => ['theme' => $theme, 'theme_token' => $theme_token]]);
......@@ -113,7 +113,7 @@ public function testDetermineActiveThemeInvalidToken() {
* @covers ::determineActiveTheme
*/
public function testDetermineActiveThemeDefaultTheme() {
$theme = 'bartik';
$theme = 'stark';
// When the theme is the system default, an empty string is provided as the
// theme token. See system_js_settings_alter().
$theme_token = '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment