silverstripe-framework/tests/dev/BacktraceTest.php
Ingo Schommer 07c821c4a7 ENHANCEMENT Added $argCharLimit to SS_Backtrace::full_func_name(), to avoid printing really long strings its set to 10,000 by default
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114137 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-11-24 06:23:50 +00:00

26 lines
539 B
PHP

<?php
/**
* @package sapphire
* @subpackage tests
*/
class BacktraceTest extends SapphireTest {
function testFullFuncNameWithArgsAndCustomCharLimit() {
$func = array(
'class' => 'MyClass',
'type' => '->',
'file' => 'MyFile.php',
'line' => 99,
'function' => 'myFunction',
'args' => array(
'number' => 1,
'mylongstring' => 'more than 20 characters 1234567890',
)
);
$this->assertEquals(
'MyClass->myFunction(1,more than 20 charact...)',
SS_Backtrace::full_func_name($func, true, 20)
);
}
}