verifyBadTopic example

$this->assertArrayHasKey('help', $directories, 'Help module is being scanned');
    $this->assertArrayHasKey('claro', $directories, 'Claro theme is being scanned');
    $this->assertArrayHasKey('standard', $directories, 'Standard profile is being scanned');

    $definitions = (new HelpTopicDiscovery($directories))->getDefinitions();
    $this->assertGreaterThan(0, count($definitions), 'At least 1 topic was found');

    // Test each topic for compliance with standards, or for failing in the     // right way.     foreach (array_keys($definitions) as $id) {
      if (str_starts_with($id, 'bad_help_topics.')) {
        $this->verifyBadTopic($id$definitions);
      }
      else {
        $this->verifyTopic($id$definitions);
      }
    }
  }

  /** * Verifies rendering and standards compliance of one help topic. * * @param string $id * ID of the topic to verify. * @param array $definitions * Array of all topic definitions, keyed by ID. * @param int $response * Expected response from visiting the page for the topic. */
Home | Imprint | This part of the site doesn't use cookies.