MINOR Don't show warning if running tests

This commit is contained in:
Sean Harvey 2012-04-14 22:31:54 +12:00
parent b2d602f275
commit d7973ea006

View File

@ -237,7 +237,7 @@ class TableListField extends FormField {
*/
function __construct($name, $sourceClass = null, $fieldList = null, $sourceFilter = null,
$sourceSort = null, $sourceJoin = null) {
if(FRAMEWORK_DIR != 'sapphire') {
if(FRAMEWORK_DIR != 'sapphire' && !SapphireTest::is_running_test()) {
user_error('TableListField requires FRAMEWORK_DIR to be sapphire.', E_USER_WARNING);
}