1
0
Fork 0
MySQLDumper/tests/unit/library/Msd/ConfigurationPhpValuesTest.php

24 Zeilen
779 B
PHP

2011-06-10 21:55:32 +00:00
<?php
/**
* @group configuration
*/
class Msd_ConfigurationPhpValuesTest extends PHPUnit_Framework_TestCase
{
public function testCanFallbackTo30SecondsExecutionTime()
{
ini_set('max_execution_time', 31);
$dynamicValues = Msd_ConfigurationPhpValues::getDynamicValues();
$this->assertEquals(30, $dynamicValues->maxExecutionTime);
ini_set('max_execution_time', 0);
2011-06-10 21:55:32 +00:00
}
public function testCanFallbackTo16MbRam()
{
$activeValue = ini_get('memory_limit');
ini_set('memory_limit', '15M');
$dynamicValues = Msd_ConfigurationPhpValues::getDynamicValues();
// reset value to not break tests
ini_set('memory_limit', $activeValue);
$this->assertEquals(16, $dynamicValues->phpRam);
}
}