mirror of
https://github.com/e107inc/e107.git
synced 2025-03-28 08:12:42 +01:00
Added performance test for e_form::inlineToken()
This commit is contained in:
parent
6f8d6fff5b
commit
9125b60b59
@ -935,4 +935,19 @@ class e_formTest extends \Codeception\Test\Unit
|
||||
{
|
||||
|
||||
}*/
|
||||
|
||||
public function testInlineTokenGeneratedOnlyOnce()
|
||||
{
|
||||
$class = new \ReflectionClass('e_form');
|
||||
|
||||
$method = $class->getMethod('inlineToken');
|
||||
$method->setAccessible(true);
|
||||
|
||||
$results = [];
|
||||
$results[] = $method->invoke($this->_frm);
|
||||
$results[] = $method->invoke($this->_frm);
|
||||
|
||||
$this->assertEquals($results[0], $results[1],
|
||||
"Generated tokens differ. Watch out for performance penalty!");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user