You are here

public function EnvironmentTest::testCheckMemoryLimit in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 38
Contains \Drupal\Tests\Component\Utility\EnvironmentTest.

Class

EnvironmentTest
Test PHP Environment helper methods.

Namespace

Drupal\Tests\Component\Utility

Code

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