|
| 1 | +<?php |
| 2 | + |
| 3 | +// CSS Processor |
| 4 | +//require_once __DIR__ . '/../../../../src/wp-includes/html-api/class-wp-css.php'; |
| 5 | + |
| 6 | +// Tag Processor |
| 7 | +require_once __DIR__ . '/../../../../src/wp-includes/html-api/class-wp-html-attribute-token.php'; |
| 8 | +require_once __DIR__ . '/../../../../src/wp-includes/html-api/class-wp-html-span.php'; |
| 9 | +require_once __DIR__ . '/../../../../src/wp-includes/html-api/class-wp-html-text-replacement.php'; |
| 10 | +require_once __DIR__ . '/../../../../src/wp-includes/html-api/class-wp-html-tag-processor.php'; |
| 11 | + |
| 12 | +// HTML Processor |
| 13 | +require_once __DIR__ . '/../../../../src/wp-includes/html-api/class-wp-html-unsupported-exception.php'; |
| 14 | +require_once __DIR__ . '/../../../../src/wp-includes/html-api/class-wp-html-active-formatting-elements.php'; |
| 15 | +require_once __DIR__ . '/../../../../src/wp-includes/html-api/class-wp-html-open-elements.php'; |
| 16 | +require_once __DIR__ . '/../../../../src/wp-includes/html-api/class-wp-html-token.php'; |
| 17 | +require_once __DIR__ . '/../../../../src/wp-includes/html-api/class-wp-html-processor-state.php'; |
| 18 | +require_once __DIR__ . '/../../../../src/wp-includes/html-api/class-wp-html-processor.php'; |
| 19 | + |
| 20 | +// Templating |
| 21 | +//require_once __DIR__ . '/../../../../src/wp-includes/html-api/class-wp-html-template.php'; |
| 22 | +//require_once __DIR__ . '/../../../../src/wp-includes/html-api/class-wp-html.php'; |
| 23 | + |
| 24 | +if ( ! defined( 'DIR_TESTDATA' ) ) { |
| 25 | + define( 'DIR_TESTDATA', __DIR__ . '/../../data' ); |
| 26 | +} |
| 27 | + |
| 28 | +if ( ! class_exists( 'WP_UnitTestCase' ) ) { |
| 29 | + class WP_UnitTestCase extends PHPUnit\Framework\TestCase { |
| 30 | + public $caught_doing_it_wrong = array(); |
| 31 | + |
| 32 | + public function setExpectedIncorrectUsage( $doing_it_wrong ) { |
| 33 | + |
| 34 | + } |
| 35 | + } |
| 36 | +} |
| 37 | + |
| 38 | +if ( ! function_exists( 'esc_attr' ) ) { |
| 39 | + function esc_attr( $s ) { |
| 40 | + return str_replace( [ '<', '>', '"' ], [ '<', '>', '"' ], $s ); |
| 41 | + } |
| 42 | +} |
| 43 | + |
| 44 | +if ( ! function_exists( 'esc_html' ) ) { |
| 45 | + function esc_html( $s ) { |
| 46 | + return esc_attr( $s ); |
| 47 | + } |
| 48 | +} |
| 49 | + |
| 50 | +if ( ! function_exists( '__' ) ) { |
| 51 | + function __( $s ) { |
| 52 | + return $s; |
| 53 | + } |
| 54 | +} |
| 55 | + |
| 56 | +if ( ! function_exists( '_doing_it_wrong' ) ) { |
| 57 | + function _doing_it_wrong( ...$args ) { |
| 58 | + |
| 59 | + } |
| 60 | +} |
| 61 | + |
| 62 | +if ( ! class_exists( 'HTMLProcessorDebugger' ) ) { |
| 63 | + class HTMLProcessorDebugger extends WP_HTML_Tag_Processor { |
| 64 | + |
| 65 | + } |
| 66 | +} |
0 commit comments