31 $this->_memoryLimit = $this->createPartialMock(\
Magento\TestFramework\MemoryLimit::class, [
'printStats']);
32 $this->_activationPolicy = $this->createPartialMock(\stdClass::class, [
'register_shutdown_function']);
33 $this->_object = new \Magento\TestFramework\Bootstrap\Memory(
35 [$this->_activationPolicy,
'register_shutdown_function']
41 $this->_memoryLimit =
null;
42 $this->_activationPolicy =
null;
43 $this->_object =
null;
52 new \Magento\TestFramework\Bootstrap\Memory($this->_memoryLimit,
'non_existing_callable');
58 $this->expectOutputString(
"{$eol}=== Memory Usage System Stats ==={$eol}Dummy Statistics{$eol}");
59 $this->_memoryLimit->expects(
64 $this->returnValue(
'Dummy Statistics')
66 $this->_object->displayStats();
71 $this->_activationPolicy->expects(
74 'register_shutdown_function' 76 $this->identicalTo([$this->_object,
'displayStats'])
78 $this->_object->activateStatsDisplaying();
83 $this->_activationPolicy->expects(
86 'register_shutdown_function' 88 $this->identicalTo([$this->_memoryLimit,
'validateUsage'])
90 $this->_object->activateLimitValidation();
testActivateLimitValidation()
testConstructorException()
testActivateStatsDisplaying()