PHP Класс eZ\Publish\Core\FieldType\Tests\RichText\Converter\Xslt\BaseTest

Наследование: extends PHPUnit_Framework_TestCas\PHPUnit_Framework_TestCase
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$converter eZ\Publish\Core\FieldType\RichText\Converter
$validator eZ\Publish\Core\FieldType\RichText\Validator

Открытые методы

Метод Описание
getFixtureSubdirectories ( ) : array Returns subdirectories for input and output fixtures.
providerForTestConvert ( ) : array Provider for conversion test.
testConvert ( string $inputFile, string $outputFile )

Защищенные методы

Метод Описание
createDocument ( string $xmlFile ) : DOMDocument
formatValidationErrors ( $outputFile, array $errors )
getConversionTransformationStylesheet ( ) : string Return the absolute path to conversion transformation stylesheet.
getConversionValidationSchema ( ) : string[] Return an array of absolute paths to conversion result validation schemas.
getConversionValidator ( ) : Validator
getConverter ( ) : Xslt
getCustomConversionTransformationStylesheets ( ) : array Return custom XSLT stylesheets configuration.
removeComments ( DOMDocument $document )

Описание методов

createDocument() защищенный Метод

protected createDocument ( string $xmlFile ) : DOMDocument
$xmlFile string
Результат DOMDocument

formatValidationErrors() защищенный Метод

protected formatValidationErrors ( $outputFile, array $errors )
$errors array

getConversionTransformationStylesheet() абстрактный защищенный Метод

Return the absolute path to conversion transformation stylesheet.
abstract protected getConversionTransformationStylesheet ( ) : string
Результат string

getConversionValidationSchema() защищенный Метод

Return an array of absolute paths to conversion result validation schemas.
protected getConversionValidationSchema ( ) : string[]
Результат string[]

getConversionValidator() защищенный Метод

protected getConversionValidator ( ) : Validator
Результат eZ\Publish\Core\FieldType\RichText\Validator

getConverter() защищенный Метод

protected getConverter ( ) : Xslt
Результат eZ\Publish\Core\FieldType\RichText\Converter\Xslt

getCustomConversionTransformationStylesheets() защищенный Метод

Stylesheet paths must be absolute. Code example: array( array( "path" => __DIR__ . "/core.xsl", "priority" => 100 ), array( "path" => __DIR__ . "/custom.xsl", "priority" => 99 ), )
protected getCustomConversionTransformationStylesheets ( ) : array
Результат array

getFixtureSubdirectories() абстрактный публичный Метод

The test will try to match each XML file in input directory with the file of the same name in the output directory. It is possible to test lossy conversion as well (say legacy ezxml). To use this filename of the fixture that is converted with data loss needs to end with .lossy.xml. As input test with this fixture will be skipped, but as output fixture it will be matched to the input fixture file of the same name but without .lossy part. If input file could not be matched with output file, test will be marked as incomplete, meaning pairing of fixtures is expected. To implement additional tests for lossy conversion put the test fixtures inside "lossy" subdirectory in the input directory. This directory needs to contain both source and destination fixtures, matched by the filename and part of the filename directly before the file extension. This part of the filename will be matched from the name of fixture subdirectories. Example for conversion from ezxml to docbook: .../_fixtures/ezxml/lossy/001-sectionNested.ezxml.xml will be converted to with: .../_fixtures/ezxml/lossy/001-sectionNested.docbook.xml Comments in fixtures are removed before conversion, so be free to use comments inside fixtures for documentation as needed. Example: return array( "input" => "docbook", "output" => "ezxml" );
abstract public getFixtureSubdirectories ( ) : array
Результат array

providerForTestConvert() публичный Метод

Provider for conversion test.
public providerForTestConvert ( ) : array
Результат array

removeComments() защищенный Метод

protected removeComments ( DOMDocument $document )
$document DOMDocument

testConvert() публичный Метод

public testConvert ( string $inputFile, string $outputFile )
$inputFile string
$outputFile string

Описание свойств

$converter защищенное свойство

protected Converter,eZ\Publish\Core\FieldType\RichText $converter
Результат eZ\Publish\Core\FieldType\RichText\Converter

$validator защищенное свойство

protected Validator,eZ\Publish\Core\FieldType\RichText $validator
Результат eZ\Publish\Core\FieldType\RichText\Validator