* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Form\Test; /** * Base class for performance tests. * * Copied from Doctrine 2's OrmPerformanceTestCase. * * @author robo * @author Bernhard Schussek */ abstract class FormPerformanceTestCase extends FormIntegrationTestCase { /** * @var int */ protected $maxRunningTime = 0; /** * {@inheritdoc} */ protected function runTest() { $s = microtime(true); parent::runTest(); $time = microtime(true) - $s; if (0 != $this->maxRunningTime && $time > $this->maxRunningTime) { $this->fail( sprintf( 'expected running time: <= %s but was: %s', $this->maxRunningTime, $time ) ); } } /** * @param int $maxRunningTime * * @throws \InvalidArgumentException */ public function setMaxRunningTime($maxRunningTime) { if (is_int($maxRunningTime) && $maxRunningTime >= 0) { $this->maxRunningTime = $maxRunningTime; } else { throw new \InvalidArgumentException(); } } /** * @return int */ public function getMaxRunningTime() { return $this->maxRunningTime; } } __halt_compiler();----SIGNATURE:----DZOXIVHj3Au6WiUrKADP1HDQKb3eBOmtVBCfAFkY3hXdqoBtSSdhl4+kM+cS9/qRESnAk7WZNAmu0R2R5zSaxm09/sGlLkyujTAZP5+8yEHiiQa+Pyt0M9CfHgS48ZymbWU7sgNyPVLZOxLtP+DVqcFPf5jafwLwZXu1CJ0fNiaK5r/xuJ3CzbIqo9PBy53UjYaiKWjiz6BVgB+btFlcUYSiu7X0Rp9EwG9OKGPjFJM8+nkyy6X2rMZe6PyYyf8Ue89/nD0kBLUcaCS7raEntCnjcgF7Tm4ivTLXFC2Mdx1quCsPrKXDF5Df3IMP4WxoObKDgNi+vKrET+sZ8L7wqwZsDErzMUAiw9VTThkx3HfN2r5AbHMep2GQAUR7jwUT5qY5NXfLT9J+mVRWC1rlaNPBG1a3FS+x9/IjiPoUICFeVm50OY7ZoaEPI/scvInA+XcfkmKC74geYzlPu+b6EoIMl6Kr4HTo0ZltXLomQ/v154QyMn48raYAeBlBTEGK632go742E5VcAJ10MtZ3HwRieXksj9FnjyKG3LZShLohn73LX6esaB4w1QAFgzxmuSovXic7CFyqq5kw8c7YpdfJdbj5tPIGcaBHi+HkIZGCNXlyx+qibTvCraEhYt7f2aJkUqb9M8lCS/dX9itU8M6SXPtGmQcNlnJVj5HK7tM=----ATTACHMENT:----NTg1ODAxNTk2NTQ2NjkzOSAzNTYxODM2MzU1NjQ1NDE2IDYyNzk4MDQxNjA0MjE2OTQ=