Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/dataninja.cn/core/tests/Drupal/Tests/Core/Annotation/

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/dataninja.cn/core/tests/Drupal/Tests/Core/Annotation/PluralTranslationTest.php

<?php

namespace Drupal\Tests\Core\Annotation;

use Drupal\Core\Annotation\PluralTranslation;
use Drupal\Tests\UnitTestCase;

/**
 * @coversDefaultClass \Drupal\Core\Annotation\PluralTranslation
 * @group Annotation
 */
class PluralTranslationTest extends UnitTestCase {

  /**
   * @covers ::get
   *
   * @dataProvider providerTestGet
   */
  public function testGet(array $values) {
    $annotation = new PluralTranslation($values);

    $default_values = [
      'context' => NULL,
    ];
    $this->assertEquals($values + $default_values, $annotation->get());
  }

  /**
   * Provides data to self::testGet().
   */
  public function providerTestGet() {
    $data = [];
    $data[] = [
      [
        'singular' => $this->randomMachineName(),
        'plural' => $this->randomMachineName(),
        'context' => $this->randomMachineName(),
      ],
    ];
    $data[] = [
      [
        'singular' => $this->randomMachineName(),
        'plural' => $this->randomMachineName(),
      ],
    ];

    return $data;
  }

  /**
   * @dataProvider providerTestMissingData
   */
  public function testMissingData($data) {
    $this->setExpectedException(\InvalidArgumentException::class);
    new PluralTranslation($data);
  }

  public function providerTestMissingData() {
    $data = [];
    $data['all-missing'] = [[]];
    $data['singular-missing'] = [['plural' => 'muh']];
    $data['plural-missing'] = [['singular' => 'muh']];
    return $data;
  }

}

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