Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html1/web/core/modules/content_moderation/tests/src/Kernel/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html1/web/core/modules/content_moderation/tests/src/Kernel/EntityRevisionConverterTest.php

<?php

namespace Drupal\Tests\content_moderation\Kernel;

use Drupal\KernelTests\KernelTestBase;
use Drupal\node\Entity\Node;
use Drupal\node\Entity\NodeType;
use Drupal\Tests\user\Traits\UserCreationTrait;

/**
 * @coversDefaultClass \Drupal\content_moderation\ParamConverter\EntityRevisionConverter
 * @group content_moderation
 * @group legacy
 */
class EntityRevisionConverterTest extends KernelTestBase {

  use UserCreationTrait;

  /**
   * {@inheritdoc}
   */
  public static $modules = [
    'user',
    'system',
    'content_moderation',
    'node',
    'workflows',
  ];

  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    parent::setUp();

    $this->setUpCurrentUser();

    $this->installEntitySchema('node');
    $this->installSchema('node', 'node_access');
  }

  /**
   * @covers ::convert
   * @expectedDeprecationMessage The load_pending_revision flag has been deprecated. You should use load_latest_revision instead.
   */
  public function testDeprecatedLoadPendingRevisionFlag() {
    NodeType::create([
      'type' => 'article',
    ])->save();

    $node = Node::create([
      'title' => 'test',
      'type' => 'article',
    ]);
    $node->save();

    $node->isDefaultRevision(FALSE);
    $node->setNewRevision(TRUE);
    $node->save();

    $converted = $this->container->get('paramconverter.latest_revision')->convert($node->id(), [
      'load_pending_revision' => TRUE,
      'type' => 'entity:node',
    ], 'node', []);
    $this->assertEquals($converted->getLoadedRevisionId(), $node->getLoadedRevisionId());
  }

}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net