Verified Commit ce8a3d5d authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3504776 by quietone, annmarysruthy, vighneshh, oily, smustgrave,...

Issue #3504776 by quietone, annmarysruthy, vighneshh, oily, smustgrave, borisson_: Fix Drupal.Commenting.FunctionComment.MissingReturnComment in extension tests
parent 0b439c08
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ public static function largeContentBuilder() {
   * #lazy_builder callback; builds <time> markup with current time.
   *
   * @return array
   *   Render array with a <time> markup with current time and cache settings.
   */
  public static function currentTime() {
    return [
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ class BigPipePlaceholderTestCases {
   *   Optional. Necessary to get the embedded AJAX/HTML responses.
   *
   * @return \Drupal\big_pipe_test\BigPipePlaceholderTestCase[]
   *   An array of placeholder test cases.
   */
  public static function cases(?ContainerInterface $container = NULL, ?AccountInterface $user = NULL) {
    // Define the two types of cacheability that we expect to see. These will be
+13 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ class BigPipeTestController implements TrustedCallbackInterface {
   * Returns all BigPipe placeholder test case render arrays.
   *
   * @return array
   *   Render array containing various Big Pipe placeholder test cases.
   */
  public function test() {
    $has_session = \Drupal::service('session_configuration')->hasSession(\Drupal::requestStack()->getMainRequest());
@@ -63,6 +64,7 @@ public function test() {

  /**
   * @return array
   *   List of all BigPipe placeholder test cases.
   */
  public static function nope() {
    return ['#markup' => '<p>Nope.</p>'];
@@ -74,6 +76,7 @@ public static function nope() {
   * @see \Drupal\Tests\big_pipe\Functional\BigPipeTest::testBigPipeMultiOccurrencePlaceholders()
   *
   * @return array
   *   Render array with multiple placeholders using a lazy builder.
   */
  public function multiOccurrence() {
    return [
@@ -96,6 +99,9 @@ public function multiOccurrence() {
   * A page with placeholder preview.
   *
   * @return array[]
   *   A render array with two containers:
   *   - 'user_container': Loads the user’s display name via a lazy builder.
   *   - 'user_links_container': Loads user links with a placeholder preview.
   */
  public function placeholderPreview() {
    return [
@@ -129,6 +135,8 @@ public function placeholderPreview() {
   * Note: does not actually use current time, that would complicate testing.
   *
   * @return array
   *   A render array containing a <time> element with a predefined date
   *   and disabled caching for dynamic rendering.
   */
  public static function currentTime() {
    return [
@@ -141,6 +149,8 @@ public static function currentTime() {
   * #lazy_builder callback; suspends its own execution then returns markup.
   *
   * @return array
   *   A render array with a pig-themed message wrapped in a <span>,
   *   and caching disabled to ensure dynamic rendering.
   */
  public static function piggy(): array {
    // Immediately call Fiber::suspend(), so that other placeholders are
@@ -159,6 +169,8 @@ public static function piggy(): array {
   * #lazy_builder callback; says "hello" or "hi".
   *
   * @return array
   *   A render array with a marquee message using BigPipeMarkup,
   *   with caching disabled and a custom cache tag.
   */
  public static function helloOrHi() {
    return [
@@ -185,6 +197,7 @@ public static function exception() {
   * @see \Drupal\big_pipe_test\EventSubscriber\BigPipeTestSubscriber::onRespondTriggerException()
   *
   * @return array
   *   A render array with plain text for testing BigPipe error handling.
   */
  public static function responseException() {
    return ['#plain_text' => BigPipeTestSubscriber::CONTENT_TRIGGER_EXCEPTION];
+1 −0
Original line number Diff line number Diff line
@@ -461,6 +461,7 @@ protected function setCsrfTokenSeedInTestEnvironment(): void {

  /**
   * @return \Drupal\big_pipe_test\BigPipePlaceholderTestCase[]
   *   An array of test cases.
   */
  protected function getTestCases($has_session = TRUE) {
    return BigPipePlaceholderTestCases::cases($this->container, $this->rootUser);
+1 −0
Original line number Diff line number Diff line
@@ -121,6 +121,7 @@ class TurtleLazyBuilder implements TrustedCallbackInterface {
   * Suspends its own execution twice to simulate long operation.
   *
   * @return array
   *   The lazy builder callback.
   */
  public static function turtle(): array {
    if (\Fiber::getCurrent() !== NULL) {
Loading