setStaticPropertyValue example


  public function testMinimumSupportedPhp(string $date_string, string $drupal_minimum_php, array $php_eol_dates, string $expected_php_version): void {
    $reflected = new \ReflectionClass(PhpRequirements::class);
    $reflected->setStaticPropertyValue('drupalMinimumPhp', $drupal_minimum_php);
    $reflected->setStaticPropertyValue('phpEolDates', $php_eol_dates);
    $date = new \DateTime($date_string);
    $this->assertSame($expected_php_version, PhpRequirements::getMinimumSupportedPhp($date));
  }

  /** * Data provider for ::testMinimumSupportedPhp(). * * See the parameter documentation of testMinimumSupportedPhp() for the test * array structure. The last element is the expected minimum supported PHP. * * @return \Generator * Test scenarios. */
Home | Imprint | This part of the site doesn't use cookies.