Verified Commit bc5c3863 authored by larowlan's avatar larowlan
Browse files

Issue #3243121 by Spokje, alexpott, longwave, yogeshmpawar, skipper-vp,...

Issue #3243121 by Spokje, alexpott, longwave, yogeshmpawar, skipper-vp, andregp, Rinku Jacob 13, catch, andypost, quietone, lauriii: Remove RDF module from the Standard profile
parent 54a3c304
......@@ -82,7 +82,6 @@ protected function getEntityCounts() {
// The 'book' module provides the 'book' node type, and the migration
// creates 12 node types.
'node_type' => 14,
'rdf_mapping' => 7,
'search_page' => 2,
'shortcut' => 2,
'shortcut_set' => 1,
......
......@@ -101,7 +101,6 @@ protected function getAvailablePaths() {
'Path',
'Poll',
'Profile',
'RDF',
'Search',
'Search embedded form',
'Shortcut',
......@@ -148,6 +147,7 @@ protected function getMissingPaths() {
'Path translation',
'Phone',
'Picture',
'RDF',
'References',
'References UUID',
'Statistics',
......
......@@ -87,7 +87,6 @@ protected function getAvailablePaths() {
'Path',
'Poll',
'Profile',
'RDF',
'Search',
'Search embedded form',
'Shortcut',
......@@ -152,6 +151,7 @@ protected function getMissingPaths() {
'Path translation',
'Phone',
'Picture',
'RDF',
'References',
'References UUID',
'Statistics',
......
......@@ -83,7 +83,6 @@ protected function getEntityCounts() {
'language_content_settings' => 24,
'node' => 7,
'node_type' => 8,
'rdf_mapping' => 8,
'search_page' => 2,
'shortcut' => 6,
'shortcut_set' => 2,
......@@ -151,7 +150,6 @@ protected function getAvailablePaths() {
'Options',
'Path',
'Phone',
'RDF',
'Search',
'Shortcut',
'Statistics',
......@@ -187,6 +185,7 @@ protected function getAvailablePaths() {
protected function getMissingPaths() {
return [
'Color',
'RDF',
'References',
'Translation sets',
'Variable realm',
......
......@@ -25,6 +25,7 @@ class Upgrade6Test extends MigrateUpgradeExecuteTestBase {
'forum',
'language',
'migrate_drupal_ui',
'rdf',
'statistics',
'telephone',
'update',
......
......@@ -26,6 +26,7 @@ class MultilingualReviewPageTest extends MultilingualReviewPageTestBase {
'telephone',
'book',
'forum',
'rdf',
'statistics',
'syslog',
'update',
......
......@@ -27,6 +27,7 @@ class NoMultilingualReviewPageTest extends NoMultilingualReviewPageTestBase {
'forum',
'language',
'migrate_drupal_ui',
'rdf',
'statistics',
'telephone',
];
......
......@@ -28,6 +28,7 @@ class Upgrade7Test extends MigrateUpgradeExecuteTestBase {
'forum',
'language',
'migrate_drupal_ui',
'rdf',
'statistics',
'telephone',
];
......
......@@ -5,6 +5,9 @@ dependencies:
- comment.type.comment
module:
- comment
enforced:
module:
- standard
id: comment.comment
targetEntityType: comment
bundle: comment
......
......@@ -5,6 +5,9 @@ dependencies:
- node.type.article
module:
- node
enforced:
module:
- standard
id: node.article
targetEntityType: node
bundle: article
......
......@@ -5,6 +5,9 @@ dependencies:
- node.type.page
module:
- node
enforced:
module:
- standard
id: node.page
targetEntityType: node
bundle: page
......
......@@ -5,6 +5,9 @@ dependencies:
- taxonomy.vocabulary.tags
module:
- taxonomy
enforced:
module:
- standard
id: taxonomy_term.tags
targetEntityType: taxonomy_term
bundle: tags
......
......@@ -13,7 +13,7 @@
use Drupal\Tests\rdf\Traits\RdfParsingTrait;
/**
* Tests the RDF mappings and RDFa markup of the standard profile.
* Tests the RDF mappings and RDFa markup on top of the standard profile.
*
* @group rdf
*/
......@@ -36,80 +36,118 @@ class StandardProfileTest extends BrowserTestBase {
public $profile = 'standard';
/**
* {@inheritdoc}
*/
protected static $modules = ['rdf'];
/**
* The base URI.
*
* @var string
*/
protected $baseUri;
/**
* The admin user.
*
* @var \Drupal\user\UserInterface
*/
protected $adminUser;
/**
* The web user.
*
* @var \Drupal\user\UserInterface
*/
protected $webUser;
/**
* The term to test.
*
* @var \Drupal\taxonomy\TermInterface
*/
protected $term;
/**
* The image to test.
*
* @var \Drupal\file\FileInterface
*/
protected $image;
/**
* The article to test.
*
* @var \Drupal\node\NodeInterface
*/
protected $article;
/**
* The comment on the article to test.
*
* @var \Drupal\comment\CommentInterface
*/
protected $articleComment;
/**
* The page to test.
*
* @var \Drupal\node\NodeInterface
*/
protected $page;
/**
* The URI of the image to test.
*
* @var string
*/
protected $imageUri;
/**
* The URI of the term to test.
*
* @var string
*/
protected $termUri;
/**
* The URI of the article to test.
*
* @var string
*/
protected $articleUri;
/**
* The URI of the page to test.
*
* @var string
*/
protected $pageUri;
/**
* The URI of the author of the article to test.
*
* @var string
*/
protected $authorUri;
/**
* The URI of the comment on the article to test.
*
* @var string
*/
protected $articleCommentUri;
/**
* The URI of the author of the comment to test.
*
* @var string
*/
protected $commenterUri;
/**
* {@inheritdoc}
*/
protected function setUp(): void {
parent::setUp();
......@@ -161,7 +199,10 @@ protected function setUp(): void {
];
$this->article = $this->drupalCreateNode($article_settings);
// Create second article to test teaser list.
$this->drupalCreateNode(['type' => 'article', 'promote' => NodeInterface::PROMOTED]);
$this->drupalCreateNode([
'type' => 'article',
'promote' => NodeInterface::PROMOTED,
]);
// Create article comment.
$this->articleComment = $this->saveComment($this->article->id(), $this->webUser->id(), NULL, 0);
......@@ -212,7 +253,6 @@ protected function doFrontPageRdfaTests() {
$this->drupalGet(Url::fromRoute('<front>'));
// Ensure that both articles are listed.
// $this->assertCount(2, $this->getRdfGraph(Url::fromRoute('<front>'), $this->baseUri)->allOfType('http://schema.org/Article'), 'Two articles found on front page.');
$this->assertEquals(2, $this->getElementByRdfTypeCount(Url::fromRoute('<front>'), $this->baseUri, 'http://schema.org/Article'), 'Two articles found on front page.');
// Test interaction count.
......@@ -455,7 +495,7 @@ protected function assertRdfaNodeCommentProperties(): void {
$text = $this->articleComment->get('comment_body')->value;
$expected_value = [
'type' => 'literal',
// There is an extra carriage return in the when parsing comments as
// There is an extra carriage return in the value when parsing comments as
// output by Bartik, so it must be added to the expected value.
'value' => "$text
",
......
......@@ -31,7 +31,6 @@ install:
- toolbar
- field_ui
- file
- rdf
- views
- views_ui
- tour
......
......@@ -124,8 +124,8 @@ protected function assertExtensionConfig(string $name, string $type): void {
$modules_to_install = array_merge($modules_to_install, $dependency->getDependencies('module'));
$themes_to_install = array_merge($themes_to_install, $dependency->getDependencies('theme'));
}
// Remove core because that cannot be installed.
$modules_to_install = array_diff(array_unique($modules_to_install), ['core']);
// Remove core and standard because they cannot be installed.
$modules_to_install = array_diff(array_unique($modules_to_install), ['core', 'standard']);
$this->container->get('module_installer')->install($modules_to_install);
$this->container->get('theme_installer')->install(array_unique($themes_to_install));
......@@ -224,6 +224,14 @@ protected function doTestsOnConfigStorage(StorageInterface $default_config_stora
$this->assertNull($this->assertConfigDiff($result, $config_name, static::$skippedConfig));
}
else {
$data = $default_config_storage->read($config_name);
$dependency = new ConfigEntityDependency($config_name, $data);
if ($dependency->hasDependency('module', 'standard')) {
// Skip configuration with a dependency on the standard profile. Such
// configuration has probably been removed from the standard profile
// and needs its own test.
continue;
}
$info = $this->container->get('extension.list.module')->getExtensionInfo($module);
if (!isset($info[ExtensionLifecycle::LIFECYCLE_IDENTIFIER]) || $info[ExtensionLifecycle::LIFECYCLE_IDENTIFIER] !== ExtensionLifecycle::EXPERIMENTAL) {
$this->fail("$config_name provided by $module does not exist after installing all dependencies");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment