ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Utf8Test.php File Reference

Go to the source code of this file.

Functions

 testLine ($test, $line, &$total, &$success, &$failed)
 

Variables

if(php_sapi_name() !='cli') $in = fopen("UTF-8-test.txt", "rt")
 
if(! $in) $columns = 0
 
while(false !==($line=fgets($in))) if(! $columns$ignore
 
 $exceptions
 
 $longTests
 
 $sectionTests = array( '3.4' )
 
 $section = null
 
 $test = ''
 
 $failed = 0
 
 $success = 0
 
 $total = 0
 
while(false !==($line=fgets($in))) if ( $failed)
 

Function Documentation

◆ testLine()

testLine (   $test,
  $line,
$total,
$success,
$failed 
)

Definition at line 122 of file Utf8Test.php.

References $columns, $exceptions, $failed, $ok, $success, $test, $total, and $verbose.

123 {
124  $stripped = $line;
125  UtfNormal::quickisNFCVerify($stripped);
126 
127  $same = ($line == $stripped);
128  $len = mb_strlen(substr($stripped, 0, strpos($stripped, '|')));
129  if ($len == 0) {
130  $len = strlen(substr($stripped, 0, strpos($stripped, '|')));
131  }
132 
133  global $columns;
134  $ok = $same ^ ($test >= 3);
135 
136  global $exceptions;
137  $ok ^= in_array($test, $exceptions);
138 
139  $ok &= ($columns == $len);
140 
141  $total++;
142  if ($ok) {
143  $success++;
144  } else {
145  $failed++;
146  }
147  global $verbose;
148  if ($verbose || !$ok) {
149  print str_replace("\n", "$len\n", $stripped);
150  }
151 }
$verbose
$total
Definition: Utf8Test.php:87
$success
Definition: Utf8Test.php:86
$failed
Definition: Utf8Test.php:85
if(! $in) $columns
Definition: Utf8Test.php:45
$exceptions
Definition: Utf8Test.php:67
$test
Definition: Utf8Test.php:84

Variable Documentation

◆ $columns

if (! $in) $columns = 0

Definition at line 45 of file Utf8Test.php.

Referenced by ilStudyProgrammeIndividualPlanTableGUI\__construct(), ilStudyProgrammeMembersTableGUI\__construct(), ilExerciseSubmissionTableGUI\__construct(), MDB2_Result_oci8\_getColumnNames(), MDB2_Result_pgsql\_getColumnNames(), MDB2_Result_mysql\_getColumnNames(), MDB2_Result_mysqli\_getColumnNames(), PHPExcel_Reader_Excel5\_readMulRk(), MDB2_Driver_Datatype_Common\_sortResultFieldTypes(), PHPExcel_Writer_Excel2007_Worksheet\_writeAutoFilter(), SurveyMatrixQuestionGUI\addFieldsToEditForm(), PHPExcel_Calculation_LookupRef\COLUMNS(), TCPDF_PARSER\decodeXrefStream(), ilDBPdo\equals(), ilGlossaryAdvMetaDataAdapter\getColumnOrder(), ilTrSummaryTableGUI\getSelectableColumns(), ilTrMatrixTableGUI\getSelectableColumns(), ilRepositoryUserResultTableGUI\getSelectableColumns(), ilExerciseSubmissionTableGUI\getSelectableColumns(), ilDBPdoReversePostgres\getTableConstraintDefinition(), MDB2_Driver_Reverse_pgsql\getTableConstraintDefinition(), ilDBPdoReverse\getTableFieldDefinition(), MDB2_Driver_Reverse_mysql\getTableFieldDefinition(), MDB2_Driver_Reverse_mysqli\getTableFieldDefinition(), MDB2_Driver_Reverse_pgsql\getTableIndexDefinition(), PHPExcel_Calculation_LookupRef\OFFSET(), MDB2_Driver_oci8\prepare(), ilScormAiccDataSet\readData(), PHPExcel_Calculation_LookupRef\ROWS(), ilDBPdoFieldDefinition\sortResultFieldTypes(), testLine(), ilDBPdo\update(), ilIndividualAssessmentMembersTableGUI\visibleColumns(), ilScormAiccDataSet\writeData(), and ilWikiStat\writeData().

◆ $exceptions

$exceptions
Initial value:
# Tests that should mark invalid characters due to using long
# sequences beyond what is now considered legal.
'2.1.5', '2.1.6', '2.2.4', '2.2.5', '2.2.6', '2.3.5',
# Literal 0xffff, which is illegal
'2.2.3' )
File written to
Sum of both Ranges is
Definition: 03formulas.php:77
Create styles array
The data for the language used.

Definition at line 67 of file Utf8Test.php.

Referenced by Twig_Loader_Chain\getCacheKey(), Twig_Loader_Chain\getSource(), Twig_Loader_Chain\getSourceContext(), Twig_Error\guessTemplateInfo(), Twig_Loader_Chain\isFresh(), testLine(), SAML2\SignedElementHelper\validate(), and SAML2\Message\validate().

◆ $failed

◆ $ignore

while (false !==( $line=fgets( $in))) if (! $columns) $ignore
Initial value:
# These two lines actually seem to be corrupt
'2.1.1', '2.2.1' )
File written to
Hide grid lines
Definition: 21pdf.php:55
Create styles array
The data for the language used.

Definition at line 63 of file Utf8Test.php.

Referenced by MDB2_Driver_Common\_skipDelimitedStrings(), Monolog\Formatter\LineFormatter\ignoreEmptyContextAndExtra(), and Monolog\Handler\ElasticSearchHandlerTest\testConnectionErrors().

◆ $in

if (php_sapi_name() !='cli') $in = fopen("UTF-8-test.txt", "rt")

Definition at line 37 of file Utf8Test.php.

Referenced by ilWikiContentSearch\__createInStatement(), ilLMContentSearch\__createInStatement(), ilMetaDataSearch\__createInStatement(), ilObjectSearch\__createInStatement(), ilAdvancedSearch\__getInStatement(), ilMetaDataSearch\__searchContribute(), ilMetaDataSearch\__searchDescriptions(), ilMetaDataSearch\__searchKeywords(), ilMetaDataSearch\__searchTitles(), ilSCORM2004Tracking\_countCompleted(), ilObjSCORMTracking\_countCompleted(), ilCourseObjective\_deleteAll(), ilNestedSetXML\_deleteAllChildMetaData(), ilObjQuestionPool\_getAvailableQuestionpools(), ilSCORM2004Tracking\_getCollectionStatus(), ilObjSCORMTracking\_getCollectionStatus(), ilObjSCORMTracking\_getCompleted(), ilSCORM2004Tracking\_getCountCompletedPerUser(), ilObjSCORMTracking\_getCountCompletedPerUser(), ilObjSCORMTracking\_getFailed(), ilObjSCORMTracking\_getInProgress(), ilSCORM2004Tracking\_getItemProgressInfo(), ilObjSCORMTracking\_getProgressInfo(), ilLPStatusObjectives\_getStatusInfo(), soap_server\add_to_map(), nusoap_server\add_to_map(), wsdl\addOperation(), ilObjBookingPoolGUI\buildDatesBySchedule(), HTMLPurifier_Encoder\cleanUTF8(), ilFileUtils\fastGunzip(), ilFileUtils\fastGZip(), ilGlossaryTerm\getFirstLetters(), ilOnScreenChatUserDataProvider\getInitialUserProfileData(), ilObjUser\getPersonalPicturePath(), ilGlossaryTerm\getTermList(), ilObjForum\getUserIdsOfLastPostsByRefIdAndThreadIds(), ilObjUser\hasToAcceptTermsOfService(), HTMLPurifier_Encoder\iconv(), ilDBOracle\in(), HTMLPurifier_AttrTypes\makeEnum(), ilMail\markRead(), ilMail\markUnread(), ilMail\moveMailsToFolder(), ilWikiContentSearch\performSearch(), ilLMContentSearch\performSearch(), ilObjectSearch\performSearch(), ilObjForum\preloadForumIdsByObjIds(), ilObjForum\preloadForumIdsByRefIds(), ilMailUserCache\preloadUserObjects(), ilForumAuthorInformationCache\preloadUserObjects(), ilCalendarCategories\readPrivateCalendars(), ilCalendarCategories\readPublicCalendars(), ilSCORM13Package\removeCPData(), ilObjTermsOfService\resetAll(), ilObjStyleSheetGUI\saveTagStyle(), ilSCORMOfflineMode\sop2il(), ilObjSCORMTracking\storeJsApi(), Monolog\Formatter\NormalizerFormatterTest\testDetectAndCleanUtf8(), SimpleSAML_Utilities\transposeArray(), and HTMLPurifier_Encoder\unsafeIconv().

◆ $longTests

$longTests
Initial value:
# These tests span multiple lines
'3.1.9', '3.2.1', '3.2.2', '3.2.3', '3.2.4', '3.2.5',
'3.4' )
Hide grid lines
Definition: 21pdf.php:55
Create styles array
The data for the language used.

Definition at line 75 of file Utf8Test.php.

◆ $section

$section = null

Definition at line 83 of file Utf8Test.php.

Referenced by ilMDEditorGUI\__setTabs(), ilObjTestSettingsGeneralGUI\addAvailabilityProperties(), ilWorkflowArmerGUI\addStartEventInputItems(), ilWorkflowArmerGUI\addStaticInputItems(), ilObjTestSettingsGeneralGUI\addTestIntroProperties(), ilADTGroupFormBridge\addToForm(), ilOrgUnitTypeFormGUI\addTranslationInputs(), ilStudyProgrammeTypeFormGUI\addTranslationInputs(), ilECSMappingSettingsGUI\cInitMappingForm(), ilObjPDFGenerationGUI\configForm(), ilCloudPluginSettingsGUI\createPluginSection(), ilSystemStyleSettingsGUI\editSystemStyleForm(), ilRegistrationGUI\fillAgreement(), ilChatroomFormFactory\getSettingsForm(), ilObjMediaCastGUI\initAddCastItemForm(), ilObjBookingPoolGUI\initBookingNumbersForm(), ilObjPollGUI\initEditCustomForm(), ilObjExerciseGUI\initEditCustomForm(), ilObjPortfolioTemplateGUI\initEditCustomForm(), ilObjCourseGUI\initEditForm(), ilDclTableEditGUI\initForm(), ilAdvancedMDSettingsGUI\initForm(), ilObjSessionGUI\initForm(), ilLuceneAdvancedSearchGUI\initFormSearch(), ilAdvancedSearchGUI\initFormSearch(), ilAdvancedMDSettingsGUI\initFormSubstitutions(), ilExerciseManagementGUI\initIndividualDeadlineForm(), ilObjCourseGUI\initInfoEditor(), ilLTIProviderObjectSettingGUI\initObjectSettingsForm(), ilObjContentObjectGUI\initPropertiesForm(), ilObjSurveyGUI\initPropertiesForm(), ilOrgUnitGlobalSettingsGUI\initSettingsForm(), ilObjGlossaryGUI\initSettingsForm(), ilSystemStyleLessGUI\initSystemStyleLessForm(), ilAdvancedMDRecordGUI\parseRecordSelection(), ilAdvancedMDRecordGUI\parseSearch(), ilObjWorkflowEngineGUI\prepareAdminOutput(), ilSystemStyleIconsGUI\preview(), Parser\replaceSection(), ilObjComponentSettingsGUI\showPlugin(), ViewControlTest\test_implements_factory_interface(), and ViewControlTest\test_render_viewcontrol_section().

◆ $sectionTests

$sectionTests = array( '3.4' )

Definition at line 81 of file Utf8Test.php.

◆ $success

$success = 0

Definition at line 86 of file Utf8Test.php.

Referenced by ilCourseRegistrationGUI\add(), sspmod_cas_Auth_Source_CAS\casServiceValidate(), ilObjBookingPoolGUI\confirmedBookingNumbersObject(), ilObjBookingPoolGUI\confirmedBookingObject(), PHPExcel_CachedObjectStorage_Wincache\copyCellCollection(), ilMaterializedPathTree\createFromParentReleation(), getid3_writetags\DeleteTags(), ilExSubmissionObjectGUI\directSubmitObject(), ilImport\doImportObject(), ilExport\exportEntity(), ilExport\exportObject(), ilOrgUnitTypeFormGUI\fillObject(), ilStudyProgrammeTypeFormGUI\fillObject(), Gettext\Translator\fixTerseIfs(), PHPExcel_CachedObjectStorage_Wincache\getCacheData(), ilTestSignatureGUI\getTestOutputGUI(), Title\invalidateCache(), PHPExcel_CachedObjectStorage_APC\isDataSet(), PHPExcel_CachedObjectStorage_Wincache\isDataSet(), PHPExcel_CachedObjectStorage_Memcache\isDataSet(), ilDAVServer\LOCK(), sspmod_radius_Auth_Source_Radius\login(), ilObjQuestionPool\pasteFromClipboard(), ilExport\processExporter(), ilExSubmission\processUploadedZipFile(), ilTestSignaturePlugin\redirectToTest(), ilPreviewRenderer\render(), Securimage\saveCodeToDatabase(), ilAssQuestionSkillAssignmentsGUI\saveSkillPointsCmd(), League\Flysystem\Adapter\Local\setVisibility(), ilStartUpGUI\showLogin(), ilCaseNodeTest\testAttemptTransitionPreconditionsValidOnExclusiveJoin(), testLine(), ilDAVServer\UNLOCK(), ilDAVLocks\unlockWithoutCheckingDAV(), ilExSubmissionFileGUI\uploadFileObject(), ilObjPoll\uploadImage(), ilCalendarEntry\validate(), and getid3_writetags\WriteTags().

◆ $test

$test = ''

Definition at line 84 of file Utf8Test.php.

Referenced by Twig_Node_Expression_NullCoalesce\__construct(), Twig_Node_Expression_Filter_Default\__construct(), ilSCORM2004SeqTemplate\__construct(), ilCourseObjectiveQuestion\_getTest(), ilObjTest\_isComplete(), Twig_Extension_Staging\addTest(), Twig_Environment\addTest(), SAML2\Certificate\Key\assertIsString(), ilvCard\buildVCard(), ilCourseObjectiveQuestion\cloneDependencies(), Twig_Node_Expression_Test\compile(), ilContObjParser\copyFileItems(), Twig_Test_IntegrationTestCase\doIntegrationTest(), ilObjExternalToolsSettingsGUI\editMathJaxObject(), ilObjAssessmentFolderGUI\exportLogObject(), ilCourseObjectivesTableGUI\fillRow(), Magic\get_language(), assClozeTestGUI\getAnswerFeedbackOutput(), Symfony\Component\Yaml\Tests\ParserTest\getDataFormSpecifications(), ilCourseObjectiveQuestion\getFinalTests(), Twig_Tests_TemplateTest\getGetAttributeTests(), ilTestVerificationTableGUI\getItems(), ilCourseObjectiveQuestion\getSelfAssessmentTests(), Twig_ExpressionParser\getTest(), Twig_ExpressionParser\getTestNodeClass(), Twig_Test_IntegrationTestCase\getTests(), ilCourseObjectiveQuestion\getTests(), Twig_Environment\initExtension(), ilCourseObjectivesGUI\initFormLimits(), Twig_Parser\parse(), ilCourseObjectivesTableGUI\parse(), Twig_Test_IntegrationTestCase\parseTemplates(), Twig_ExpressionParser\parseTestExpression(), ilObjTestVerificationGUI\save(), assQuestionGUI\save(), assQuestionGUI\saveEdit(), assQuestionGUI\saveReturn(), assFormulaQuestionGUI\saveReturnFQ(), MDB2\setOptions(), ilTestLP\setTestObject(), Twig_Parser\subparse(), Monolog\Handler\FilterHandlerTest\testAcceptedLevelApi(), Monolog\Handler\FingersCrossedHandlerTest\testChannelLevelActivationStrategy(), Monolog\Handler\FingersCrossedHandlerTest\testChannelLevelActivationStrategyWithPsrLevels(), Monolog\Handler\FingersCrossedHandlerTest\testErrorLevelActivationStrategy(), Monolog\Handler\FingersCrossedHandlerTest\testErrorLevelActivationStrategyWithPsrLevel(), Monolog\Handler\BufferHandlerTest\testFlush(), Monolog\Handler\DeduplicationHandlerTest\testFlushPassthruIfAllRecordsUnderTrigger(), Monolog\Handler\DeduplicationHandlerTest\testFlushPassthruIfEmptyLog(), Monolog\Handler\DeduplicationHandlerTest\testFlushPassthruIfLogTooOld(), Monolog\Handler\DeduplicationHandlerTest\testFlushSkipsIfLogExists(), Monolog\Handler\DeduplicationHandlerTest\testGcOldLogs(), Monolog\Handler\GroupHandlerTest\testHandle(), Monolog\Handler\WhatFailureGroupHandlerTest\testHandle(), Monolog\Handler\GroupHandlerTest\testHandleBatch(), Monolog\Handler\WhatFailureGroupHandlerTest\testHandleBatch(), Monolog\Handler\GroupHandlerTest\testHandleBatchUsesProcessors(), Monolog\Handler\BufferHandlerTest\testHandleBufferLimit(), Monolog\Handler\FingersCrossedHandlerTest\testHandleBufferLimit(), Monolog\Handler\BufferHandlerTest\testHandleBufferLimitWithFlushOnOverflow(), Monolog\Handler\BufferHandlerTest\testHandleBuffers(), Monolog\Handler\FingersCrossedHandlerTest\testHandleBuffers(), Monolog\Handler\WhatFailureGroupHandlerTest\testHandleException(), Monolog\Handler\BufferHandlerTest\testHandleLevel(), Monolog\Handler\FilterHandlerTest\testHandleProcessOnlyNeededLevels(), Monolog\Handler\FilterHandlerTest\testHandleRespectsBubble(), Monolog\Handler\FingersCrossedHandlerTest\testHandleRestartBufferingAfterBeingTriggeredWhenStopBufferingIsDisabled(), Monolog\Handler\FingersCrossedHandlerTest\testHandleRestartBufferingAfterReset(), Monolog\Handler\FingersCrossedHandlerTest\testHandleStopsBufferingAfterTrigger(), Monolog\Handler\GroupHandlerTest\testHandleUsesProcessors(), Monolog\Handler\WhatFailureGroupHandlerTest\testHandleUsesProcessors(), Monolog\Handler\FilterHandlerTest\testHandleUsesProcessors(), Monolog\Handler\BufferHandlerTest\testHandleUsesProcessors(), Monolog\Handler\FingersCrossedHandlerTest\testHandleUsesProcessors(), Monolog\Handler\FingersCrossedHandlerTest\testHandleWithCallback(), Monolog\Handler\FilterHandlerTest\testHandleWithCallback(), Monolog\Handler\FilterHandlerTest\testIsHandling(), Monolog\Handler\FingersCrossedHandlerTest\testIsHandlingAlways(), testLine(), Monolog\Handler\FingersCrossedHandlerTest\testOverrideActivationStrategy(), Monolog\Handler\FingersCrossedHandlerTest\testPassthruOnClose(), Monolog\Handler\BufferHandlerTest\testPropagatesRecordsAtEndOfRequest(), Monolog\Handler\FingersCrossedHandlerTest\testPsrLevelPassthruOnClose(), Symfony\Component\Yaml\Tests\DumperTest\testSpecifications(), ilCourseObjective\toXml(), ilCourseObjectiveQuestion\toXml(), ilCourseObjectivesGUI\updateFinalTestLimits(), ilCourseObjectivesGUI\updateSelfAssessmentLimits(), and ilTestArchiver\updateTestArchive().

◆ $total

◆ if

while (false !==( $line=fgets( $in))) if($failed)

Definition at line 112 of file Utf8Test.php.