Example #1
0
 public function testRunBootstrapMemoryWatch()
 {
     $this->_injectApplicationMock(array('TESTS_MEM_USAGE_LIMIT' => 100, 'TESTS_MEM_LEAK_LIMIT' => 60));
     $this->_object->expects($this->once())->method('_createMemoryBootstrap')->with(100, 60)->will($this->returnValue($this->_memoryBootstrap));
     $this->_memoryBootstrap->expects($this->once())->method('activateStatsDisplaying');
     $this->_memoryBootstrap->expects($this->once())->method('activateLimitValidation');
     $this->_object->runBootstrap();
 }
Example #2
0
 public function testActivateLimitValidation()
 {
     $this->_activationPolicy->expects($this->once())->method('register_shutdown_function')->with($this->identicalTo([$this->_memoryLimit, 'validateUsage']));
     $this->_object->activateLimitValidation();
 }