Definition at line 8 of file MemoryLimitTest.php.
◆ _createObject()
_createObject |
( |
|
$memCap, |
|
|
|
$leakCap |
|
) |
| |
|
protected |
- Parameters
-
string | $memCap | |
string | $leakCap | |
- Returns
- \Magento\TestFramework\MemoryLimit
Definition at line 54 of file MemoryLimitTest.php.
56 $helper = $this->createPartialMock(\
Magento\TestFramework\Helper\Memory::class, [
'getRealMemoryUsage']);
57 $helper->expects($this->any())->method(
'getRealMemoryUsage')->will($this->returnValue(1024 * 1024));
58 return new \Magento\TestFramework\MemoryLimit($memCap, $leakCap,
$helper);
◆ testPrintHeader()
◆ testPrintStats()
Definition at line 17 of file MemoryLimitTest.php.
20 $result = $object->printStats();
21 $this->assertContains(
'Memory usage (OS):',
$result);
22 $this->assertContains(
'1.00M',
$result);
23 $this->assertContains(
'Estimated memory leak:',
$result);
24 $this->assertContains(
'reported by PHP',
$result);
25 $this->assertStringEndsWith(PHP_EOL,
$result);
28 $this->assertContains(
'50.00% of configured 2.00M limit', $object->printStats());
31 $this->assertContains(
'% of configured 0.49M limit', $object->printStats());
_createObject($memCap, $leakCap)
◆ testValidateUsage()
Definition at line 34 of file MemoryLimitTest.php.
37 $this->assertNull($object->validateUsage());
_createObject($memCap, $leakCap)
◆ testValidateUsageException()
testValidateUsageException |
( |
| ) |
|
@expectedException \LogicException
Definition at line 43 of file MemoryLimitTest.php.
46 $object->validateUsage();
_createObject($memCap, $leakCap)
The documentation for this class was generated from the following file:
- vendor/magento/magento2-base/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/MemoryLimitTest.php