function EnvironmentTest::testCheckMemoryLimit

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/Utility/EnvironmentTest.php \Drupal\Tests\Component\Utility\EnvironmentTest::testCheckMemoryLimit()
  2. 8.9.x core/tests/Drupal/Tests/Component/Utility/EnvironmentTest.php \Drupal\Tests\Component\Utility\EnvironmentTest::testCheckMemoryLimit()
  3. 11.x core/tests/Drupal/Tests/Component/Utility/EnvironmentTest.php \Drupal\Tests\Component\Utility\EnvironmentTest::testCheckMemoryLimit()

Tests \Drupal\Component\Utility\Environment::checkMemoryLimit().

@dataProvider providerTestCheckMemoryLimit @covers ::checkMemoryLimit

Parameters

string $required: The required memory argument for \Drupal\Component\Utility\Environment::checkMemoryLimit().

string $custom_memory_limit: The custom memory limit argument for \Drupal\Component\Utility\Environment::checkMemoryLimit().

bool $expected: The expected return value from \Drupal\Component\Utility\Environment::checkMemoryLimit().

File

core/tests/Drupal/Tests/Component/Utility/EnvironmentTest.php, line 35

Class

EnvironmentTest
Test PHP Environment helper methods.

Namespace

Drupal\Tests\Component\Utility

Code

public function testCheckMemoryLimit($required, $custom_memory_limit, $expected) : void {
    $actual = Environment::checkMemoryLimit($required, $custom_memory_limit);
    $this->assertEquals($expected, $actual);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.