TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest Class Reference
Inheritance diagram for TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest:
TYPO3\CMS\Core\Tests\UnitTestCase TYPO3\CMS\Core\Tests\BaseTestCase

Public Member Functions

 setUp ()
 
 substituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArrayDataProvider ()
 
 substituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArray ($template, $markersAndSubparts, $wrap, $uppercase, $deleteUnused, $expected)
 
 cDataWillRemainUnmodifiedDataProvider ()
 
 xHtmlCleaningDoesNotModifyCDATA ($source, $expected)
 
 tagCorrectlyRemovedWhenRmTagIfNoAttribIsConfigured ($content, $expectedResult)
 
 rmTagIfNoAttribIsConfiguredDoesNotChangeNestingType ()
 
 localNestingCorrectlyRemovesInvalidTags ($content, $expectedResult)
 
 globalNestingCorrectlyRemovesInvalidTags ($content, $expectedResult)
 

Static Public Member Functions

static spanTagCorrectlyRemovedWhenRmTagIfNoAttribIsConfiguredDataProvider ()
 
static localNestingCorrectlyRemovesInvalidTagsDataProvider ()
 
static globalNestingCorrectlyRemovesInvalidTagsDataProvider ()
 

Protected Member Functions

 parseConfigAndCleanHtml (array $tsConfig, $content)
 
- Protected Member Functions inherited from TYPO3\CMS\Core\Tests\UnitTestCase
 tearDown ()
 
- Protected Member Functions inherited from TYPO3\CMS\Core\Tests\BaseTestCase
 getAccessibleMock ( $originalClassName, array $methods=array(), array $arguments=array(), $mockClassName='', $callOriginalConstructor=TRUE, $callOriginalClone=TRUE, $callAutoload=TRUE)
 
 getAccessibleMockForAbstractClass ( $originalClassName, array $arguments=array(), $mockClassName='', $callOriginalConstructor=TRUE, $callOriginalClone=TRUE, $callAutoload=TRUE)
 
 buildAccessibleProxy ($className)
 
 callInaccessibleMethod ($object, $name)
 
 inject ($target, $name, $dependency)
 
 getUniqueId ($prefix='')
 

Protected Attributes

 $fixture = NULL
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\UnitTestCase
 $backupGlobalsBlacklist = array('TYPO3_LOADED_EXT')
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\BaseTestCase
 $backupGlobals = TRUE
 
 $backupStaticAttributes = FALSE
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Testcase for

Author
Nicole Cordes typo3.nosp@m.@cor.nosp@m.des.c.nosp@m.o

Definition at line 22 of file HtmlParserTest.php.

Member Function Documentation

◆ cDataWillRemainUnmodifiedDataProvider()

TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest::cDataWillRemainUnmodifiedDataProvider ( )
Returns
array

Definition at line 238 of file HtmlParserTest.php.

◆ globalNestingCorrectlyRemovesInvalidTags()

TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest::globalNestingCorrectlyRemovesInvalidTags (   $content,
  $expectedResult 
)
Test:
globalNestingCorrectlyRemovesInvalidTagsDataProvider
Parameters
string$content
string$expectedResult

Definition at line 397 of file HtmlParserTest.php.

References TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest\parseConfigAndCleanHtml().

◆ globalNestingCorrectlyRemovesInvalidTagsDataProvider()

static TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest::globalNestingCorrectlyRemovesInvalidTagsDataProvider ( )
static

Data provider for globalNestingCorrectlyRemovesInvalidTags

Definition at line 366 of file HtmlParserTest.php.

◆ localNestingCorrectlyRemovesInvalidTags()

TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest::localNestingCorrectlyRemovesInvalidTags (   $content,
  $expectedResult 
)
Test:
localNestingCorrectlyRemovesInvalidTagsDataProvider
Parameters
string$content
string$expectedResult

Definition at line 355 of file HtmlParserTest.php.

References TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest\parseConfigAndCleanHtml().

◆ localNestingCorrectlyRemovesInvalidTagsDataProvider()

static TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest::localNestingCorrectlyRemovesInvalidTagsDataProvider ( )
static

Data provider for localNestingCorrectlyRemovesInvalidTags

Definition at line 324 of file HtmlParserTest.php.

◆ parseConfigAndCleanHtml()

TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest::parseConfigAndCleanHtml ( array  $tsConfig,
  $content 
)
protected

Calls HTMLparserConfig() and passes the generated config to the HTMLcleaner() method on the current subject.

Parameters
array$tsConfigThe TypoScript that should be used to generate the HTML parser config.
string$contentThe content that should be parsed by the HTMLcleaner.
Returns
string The parsed content.

Definition at line 412 of file HtmlParserTest.php.

Referenced by TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest\globalNestingCorrectlyRemovesInvalidTags(), TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest\localNestingCorrectlyRemovesInvalidTags(), TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest\rmTagIfNoAttribIsConfiguredDoesNotChangeNestingType(), and TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest\tagCorrectlyRemovedWhenRmTagIfNoAttribIsConfigured().

◆ rmTagIfNoAttribIsConfiguredDoesNotChangeNestingType()

TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest::rmTagIfNoAttribIsConfiguredDoesNotChangeNestingType ( )

◆ setUp()

TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest::setUp ( )

Definition at line 29 of file HtmlParserTest.php.

◆ spanTagCorrectlyRemovedWhenRmTagIfNoAttribIsConfiguredDataProvider()

static TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest::spanTagCorrectlyRemovedWhenRmTagIfNoAttribIsConfiguredDataProvider ( )
static

Data provider for spanTagCorrectlyRemovedWhenRmTagIfNoAttribIsConfigured

Definition at line 273 of file HtmlParserTest.php.

◆ substituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArray()

TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest::substituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArray (   $template,
  $markersAndSubparts,
  $wrap,
  $uppercase,
  $deleteUnused,
  $expected 
)
Test:
substituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArrayDataProvider

Definition at line 231 of file HtmlParserTest.php.

◆ substituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArrayDataProvider()

TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest::substituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArrayDataProvider ( )

Data provider for substituteMarkerAndSubpartArrayRecursiveResolvesMarkersAndSubpartsArray

Definition at line 36 of file HtmlParserTest.php.

◆ tagCorrectlyRemovedWhenRmTagIfNoAttribIsConfigured()

TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest::tagCorrectlyRemovedWhenRmTagIfNoAttribIsConfigured (   $content,
  $expectedResult 
)
Test:
spanTagCorrectlyRemovedWhenRmTagIfNoAttribIsConfiguredDataProvider

Definition at line 294 of file HtmlParserTest.php.

References TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest\parseConfigAndCleanHtml().

◆ xHtmlCleaningDoesNotModifyCDATA()

TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest::xHtmlCleaningDoesNotModifyCDATA (   $source,
  $expected 
)
Test:
Parameters
string$source
string$expectedcDataWillRemainUnmodifiedDataProvider

Definition at line 265 of file HtmlParserTest.php.

References $result.

Member Data Documentation

◆ $fixture

TYPO3\CMS\Core\Tests\Unit\Html\HtmlParserTest::$fixture = NULL
protected

Definition at line 27 of file HtmlParserTest.php.