reverted: --- b/core/modules/help_topics/tests/modules/help_topics_test/bad_help_topics/discovery/bad_meta/expected_failure.topic.html.twig +++ /dev/null @@ -1 +0,0 @@ - reverted: --- b/core/modules/help_topics/tests/modules/help_topics_test/bad_help_topics/discovery/no_label/expected_failure.topic.html.twig +++ /dev/null @@ -1 +0,0 @@ - reverted: --- b/core/modules/help_topics/tests/modules/help_topics_test/bad_help_topics/discovery/top_level/expected_failure.topic.html.twig +++ /dev/null @@ -1 +0,0 @@ - diff -u b/core/modules/help_topics/tests/src/Functional/HelpTopicsSyntaxTest.php b/core/modules/help_topics/tests/src/Functional/HelpTopicsSyntaxTest.php --- b/core/modules/help_topics/tests/src/Functional/HelpTopicsSyntaxTest.php +++ b/core/modules/help_topics/tests/src/Functional/HelpTopicsSyntaxTest.php @@ -2,7 +2,6 @@ namespace Drupal\Tests\help_topics\Functional; -use Drupal\Component\Discovery\DiscoveryException; use Drupal\Tests\BrowserTestBase; use Drupal\help_topics\HelpTopicDiscovery; use PHPUnit\Framework\ExpectationFailedException; @@ -80,44 +79,6 @@ } } - /** - * Tests that help topic discovery fails in expected ways. - */ - public function testDiscoveryExceptions() { - $base_bad_directory = \Drupal::service('extension.list.module')->getPath('help_topics_test') . '/bad_help_topics/discovery/'; - $discovery_problems = [ - [ - 'subdirectory' => 'provider', - 'file' => 'test.topic.html.twig', - 'message' => "file name should begin with 'expected_failure'", - ], - [ - 'subdirectory' => 'top_level', - 'file' => 'expected_failure.topic.html.twig', - 'message' => "contains invalid meta tag with name='help_topic:top_level', the 'content' property should not exist", - ], - [ - 'subdirectory' => 'bad_meta', - 'file' => 'expected_failure.topic.html.twig', - 'message' => "contains invalid meta tag with name='foo'", - ], - [ - 'subdirectory' => 'no_label', - 'file' => 'expected_failure.topic.html.twig', - 'message' => "does not contain the required meta tag with name='help_topic:label'", - ], - ]; - - foreach ($discovery_problems as $info) { - $fail_directories = [ - 'expected_failure' => $base_bad_directory . $info['subdirectory'], - ]; - $this->expectException(DiscoveryException::class); - $this->expectExceptionMessage($fail_directories['expected_failure'] . '/' . $info['file'] . ' ' . $info['message']); - $this->discoverAllTopics($fail_directories); - } - } - /** * Verifies rendering and standards compliance of one help topic. *