ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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(), ilTermsOfServiceTableGUI\__construct(), ilStudyProgrammeMembersTableGUI\__construct(), ilExerciseSubmissionTableGUI\__construct(), SurveyMatrixQuestionGUI\addFieldsToEditForm(), PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Offset\adjustEndCellColumnForWidth(), Matrix\Matrix\buildFromArray(), PhpOffice\PhpSpreadsheet\Calculation\LookupRef\RowColumnInformation\COLUMNS(), Matrix\Matrix\columns(), PhpOffice\PhpSpreadsheet\Writer\Ods\NamedExpressions\convertAddress(), PhpOffice\PhpSpreadsheet\Writer\Ods\Formula\convertCellReferences(), Matrix\Builder\createFilledMatrix(), TCPDF_PARSER\decodeXrefStream(), ilDBPdo\equals(), ilTermsOfServiceDocumentTableGUI\getColumnDefinition(), ilMailFolderTableGUI\getColumnDefinition(), ilGlossaryAdvMetaDataAdapter\getColumnOrder(), ilTrSummaryTableGUI\getSelectableColumns(), ilTermsOfServiceTableGUI\getSelectableColumns(), ilMailFolderTableGUI\getSelectableColumns(), ilTrMatrixTableGUI\getSelectableColumns(), ilRepositoryUserResultTableGUI\getSelectableColumns(), ilExerciseSubmissionTableGUI\getSelectableColumns(), ilLearningSequenceParticipantsTableGUI\getSelectableColumns(), ilDBPdoReversePostgres\getTableConstraintDefinition(), ilDBPdoReverse\getTableFieldDefinition(), ilLearningSequenceRoles\isPortfolio(), Matrix\Matrix\isSquare(), PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Offset\OFFSET(), PhpOffice\PhpSpreadsheet\Calculation\LookupRef\OFFSET(), PhpOffice\PhpSpreadsheet\Writer\Xls\Workbook\parseDefinedNameValue(), ilMailFolderTableGUI\prepareHTML(), ilScormAiccDataSet\readData(), ilLearningSequenceMembershipGUI\readMemberData(), ilObjLearningSequence\readMemberData(), PhpOffice\PhpSpreadsheet\Reader\Xls\readMulRk(), PhpOffice\PhpSpreadsheet\Calculation\LookupRef\RowColumnInformation\ROWS(), ilCertificateTemplateRepository\save(), ilUserCertificateRepository\save(), phpseclib\Net\SSH2\setWindowSize(), ilDBPdoFieldDefinition\sortResultFieldTypes(), PhpOffice\PhpSpreadsheet\Calculation\Statistical\Distributions\ChiSquared\test(), testLine(), ilDBPdo\update(), PhpOffice\PhpSpreadsheet\ReferenceHelper\updateCellReferencesAllWorksheets(), PhpOffice\PhpSpreadsheet\Writer\Xlsx\Worksheet\writeAutoFilter(), ilScormAiccDataSet\writeData(), and ilWikiStat\writeData().

◆ $exceptions

$exceptions
Initial value:
= array(
# 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' )

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(), Sabre\VObject\ITip\Broker\parseEventForOrganizer(), testLine(), SAML2\SignedElementHelper\validate(), and SAML2\Message\validate().

◆ $failed

◆ $ignore

while (false !==( $line=fgets( $in))) if (! $columns) $ignore
Initial value:
= array(
# These two lines actually seem to be corrupt
'2.1.1', '2.2.1' )

Definition at line 63 of file Utf8Test.php.

Referenced by Sabre\DAV\Server\exec(), Monolog\Formatter\LineFormatter\ignoreEmptyContextAndExtra(), Sabre\CalDAV\Schedule\Plugin\processICalendarChange(), 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(), phpseclib\Crypt\Rijndael\_decryptBlock(), phpseclib\Crypt\Blowfish\_decryptBlock(), phpseclib\Crypt\RC2\_decryptBlock(), phpseclib\Crypt\Twofish\_decryptBlock(), phpseclib\Crypt\DES\_decryptBlock(), ilCourseObjective\_deleteAll(), ilNestedSetXML\_deleteAllChildMetaData(), phpseclib\Crypt\Rijndael\_encryptBlock(), phpseclib\Crypt\Blowfish\_encryptBlock(), phpseclib\Crypt\RC2\_encryptBlock(), phpseclib\Crypt\Twofish\_encryptBlock(), phpseclib\Crypt\DES\_encryptBlock(), ilObjQuestionPool\_getAvailableQuestionpools(), ilSCORM2004Tracking\_getCollectionStatus(), ilObjSCORMTracking\_getCollectionStatus(), ilObjSCORMTracking\_getCompleted(), ilSCORM2004Tracking\_getCountCompletedPerUser(), ilObjSCORMTracking\_getCountCompletedPerUser(), ilObjSCORMTracking\_getFailed(), ilObjSCORMTracking\_getInProgress(), ilSCORM2004Tracking\_getItemProgressInfo(), ilObjSCORMTracking\_getProgressInfo(), ilLPStatusObjectives\_getStatusInfo(), phpseclib\Crypt\Base\_setEngine(), soap_server\add_to_map(), nusoap_server\add_to_map(), wsdl\addOperation(), ilObjBookingPoolGUI\buildDatesBySchedule(), HTMLPurifier_Encoder\cleanUTF8(), phpseclib\File\ASN1\convert(), ilFileUtils\fastGunzip(), ilFileUtils\fastGZip(), ilGlossaryTerm\getFirstLetters(), ilOnScreenChatUserDataProvider\getInitialUserProfileData(), ilObjUser\getPersonalPicturePath(), ilGlossaryTerm\getTermList(), ilObjForum\getUserIdsOfLastPostsByRefIdAndThreadIds(), ilObjUser\hasToAcceptTermsOfService(), HTMLPurifier_Encoder\iconv(), 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(), Sabre\Uri\NormalizeTest\testNormalize(), Sabre\Uri\ParseTest\testParse(), Sabre\Uri\ParseTest\testParseFallback(), SimpleSAML_Utilities\transposeArray(), and HTMLPurifier_Encoder\unsafeIconv().

◆ $longTests

$longTests
Initial value:
= array(
# 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' )

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(), ilObjTestSettingsGeneralGUI\addPresentationProperties(), ilWorkflowArmerGUI\addStartEventInputItems(), ilWorkflowArmerGUI\addStaticInputItems(), ilObjTestSettingsGeneralGUI\addTestIntroProperties(), ilADTGroupFormBridge\addToForm(), ilOrgUnitTypeFormGUI\addTranslationInputs(), ilStudyProgrammeTypeFormGUI\addTranslationInputs(), ilECSMappingSettingsGUI\cInitMappingForm(), ilObjPDFGenerationGUI\configForm(), ilCloudPluginSettingsGUI\createPluginSection(), Jumbojett\OpenIDConnectClient\decodeJWT(), ilSystemStyleSettingsGUI\editSystemStyleForm(), ilRegistrationGUI\fillAgreement(), ilObjLearningSequenceAdminGUI\getForm(), ilLegacyKioskModeView\getMetadata(), ilChatroomFormFactory\getSettingsForm(), ilObjMediaCastGUI\initAddCastItemForm(), ilObjBookingPoolGUI\initBookingNumbersForm(), ilObjPollGUI\initEditCustomForm(), ilObjPortfolioBaseGUI\initEditCustomForm(), ilObjExerciseGUI\initEditCustomForm(), ilObjPortfolioTemplateGUI\initEditCustomForm(), ilObjSurveyQuestionPoolGUI\initEditForm(), ilObjCourseGUI\initEditForm(), ilMMSubitemFormGUI\initForm(), ilMMTopItemFormGUI\initForm(), ilDclTableEditGUI\initForm(), ilAdvancedMDSettingsGUI\initForm(), ilObjSessionGUI\initForm(), ilLuceneAdvancedSearchGUI\initFormSearch(), ilAdvancedSearchGUI\initFormSearch(), ilObjLinkResourceGUI\initFormSettings(), ilAdvancedMDSettingsGUI\initFormSubstitutions(), ilExerciseManagementGUI\initIndividualDeadlineForm(), ilObjCourseGUI\initInfoEditor(), ilBlogPostingGUI\initKeywordsForm(), ilLTIProviderObjectSettingGUI\initObjectSettingsForm(), ilObjContentObjectGUI\initPropertiesForm(), ilObjSurveyGUI\initPropertiesForm(), ilOrgUnitGlobalSettingsGUI\initSettingsForm(), ilObjGlossaryGUI\initSettingsForm(), ilObjWikiGUI\initSettingsForm(), ilSystemStyleLessGUI\initSystemStyleLessForm(), ilAdvancedMDRecordGUI\parseRecordSelection(), ilAdvancedMDRecordGUI\parseSearch(), assLongMenuGUI\populateCorrectionsFormProperties(), 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(), Sabre\Event\Promise\all(), sspmod_cas_Auth_Source_CAS\casServiceValidate(), ilObjBookingPoolGUI\confirmedBookingNumbersObject(), ilObjBookingPoolGUI\confirmedBookingObject(), Sabre\DAV\Server\createCollection(), ilMaterializedPathTree\createFromParentReleation(), getid3_writetags\DeleteTags(), ilExSubmissionObjectGUI\directSubmitObject(), ilImport\doImportObject(), ilExport\exportEntity(), ilExport\exportObject(), ilOrgUnitTypeFormGUI\fillObject(), ilStudyProgrammeTypeFormGUI\fillObject(), Gettext\Translator\fixTerseIfs(), ilTestSignatureGUI\getTestOutputGUI(), Title\invalidateCache(), sspmod_radius_Auth_Source_Radius\login(), ilObjQuestionPool\pasteFromClipboard(), ilExport\processExporter(), ilExSubmission\processUploadedZipFile(), Sabre\Event\Promise\race(), ilTestSignaturePlugin\redirectToTest(), ilPreviewRenderer\render(), Securimage\saveCodeToDatabase(), ilAssQuestionSkillAssignmentsGUI\saveSkillPointsCmd(), Sabre\HTTP\Client\sendAsync(), Sabre\HTTP\Client\sendAsyncInternal(), League\Flysystem\Adapter\Local\setVisibility(), ilStartUpGUI\showLogin(), ilCaseNodeTest\testAttemptTransitionPreconditionsValidOnExclusiveJoin(), Sabre\Event\PromiseTest\testExecutorFail(), Sabre\Event\Promise\PromiseTest\testExecutorFail(), Sabre\Event\PromiseTest\testExecutorSuccess(), Sabre\Event\Promise\PromiseTest\testExecutorSuccess(), Sabre\HTTP\MessageDecoratorTest\testHeader(), testLine(), ilExSubmissionFileGUI\uploadFileObject(), ilObjPoll\uploadImage(), ilCalendarEntry\validate(), Sabre\CardDAV\Plugin\validateFilters(), Sabre\CardDAV\Plugin\validateParamFilters(), Sabre\CardDAV\Plugin\validateTextMatches(), 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(), assClozeTestGUI\getAnswerFeedbackOutput(), Symfony\Component\Yaml\Tests\ParserTest\getDataFormSpecifications(), ilCourseObjectiveQuestion\getFinalTests(), Twig_Tests_TemplateTest\getGetAttributeTests(), ilCourseObjectiveQuestion\getSelfAssessmentTests(), Sabre\HTTP\Auth\DigestTest\getServerTokens(), 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(), Sabre\DAVACL\Plugin\principalSearch(), ilCertificateMigrationJob\run(), assQuestionGUI\save(), assQuestionGUI\saveEdit(), assQuestionGUI\saveReturn(), assFormulaQuestionGUI\saveReturnFQ(), Sabre\DAVACL\PrincipalBackend\Mock\searchPrincipals(), Sabre\DAVACL\AbstractPrincipalCollection\searchPrincipals(), Sabre\DAVACL\PrincipalBackend\PDO\searchPrincipals(), ilTestLP\setTestObject(), Twig_Parser\subparse(), Sabre\HTTP\Auth\AWSTest\test401(), Monolog\Handler\FilterHandlerTest\testAcceptedLevelApi(), Sabre\DAV\ServerSimpleTest\testBaseUriAddSlash(), Monolog\Handler\FingersCrossedHandlerTest\testChannelLevelActivationStrategy(), Monolog\Handler\FingersCrossedHandlerTest\testChannelLevelActivationStrategyWithPsrLevels(), Monolog\Handler\FingersCrossedHandlerTest\testErrorLevelActivationStrategy(), Monolog\Handler\FingersCrossedHandlerTest\testErrorLevelActivationStrategyWithPsrLevel(), Sabre\CardDAV\ValidateFilterTest\testFilter(), 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\WhatFailureGroupHandlerTest\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\FingersCrossedHandlerTest\testHandleResetBufferingAfterBeingTriggeredWhenStopBufferingIsDisabled(), Monolog\Handler\FingersCrossedHandlerTest\testHandleResetBufferingAfterReset(), Monolog\Handler\FilterHandlerTest\testHandleRespectsBubble(), Monolog\Handler\FingersCrossedHandlerTest\testHandleStopsBufferingAfterTrigger(), Monolog\Handler\WhatFailureGroupHandlerTest\testHandleUsesProcessors(), Monolog\Handler\GroupHandlerTest\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(), Sabre\DAV\ServerPropsInfiniteDepthTest\testUnknownProperty(), Sabre\DAV\ServerPropsTest\testUnknownProperty(), ilCourseObjective\toXml(), ilCourseObjectiveQuestion\toXml(), ilCourseObjectivesGUI\updateFinalTestLimits(), ilCourseObjectivesGUI\updateSelfAssessmentLimits(), ilTestArchiver\updateTestArchive(), Sabre\CardDAV\Plugin\validateFilters(), Sabre\CardDAV\Plugin\validateParamFilters(), and Sabre\CardDAV\Plugin\validateTextMatches().

◆ $total

◆ if

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

Definition at line 112 of file Utf8Test.php.