Skip to content

Commit 4fcdb14

Browse files
committed
Merge branch 'html-api/add-test-bootstraps' into html-api/reconstruct-active-formatting-elements-on-text
2 parents c57f20f + a86190b commit 4fcdb14

2 files changed

Lines changed: 95 additions & 0 deletions

File tree

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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( [ '<', '>', '"' ], [ '&lt;', '&gt;', '&quot;' ], $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+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<phpunit bootstrap="bootstrap.php" testdox="true" colors="true">
3+
<php>
4+
<!-- <const name="DEBUG" value="FALSE"/>-->
5+
</php>
6+
<testsuites>
7+
<testsuite name="html-api">
8+
<file>WpHtmlProcessor.php</file>
9+
<!-- <file>WpHtmlProcessorHtml5lib.php</file>-->
10+
<file>WpHtmlProcessorSemanticRules.php</file>
11+
<file>WpHtmlProcessorSemanticRulesHeadingElements.php</file>
12+
<file>WpHtmlProcessorSemanticRulesListElements.php</file>
13+
<file>WpHtmlProcessorBreadcrumbs.php</file>
14+
<!-- <file>WpHtmlProcessorGetInnerMarkup.php</file>-->
15+
<!-- <file>WpHtmlProcessorGetOuterMarkup.php</file>-->
16+
<!-- <file>WpHtmlProcessorSetInnerMarkup.php</file>-->
17+
<!-- <file>WpHtmlProcessorSetOuterMarkup.php</file>-->
18+
<file>WpHtmlSupportRequiredHtmlProcessor.php</file>
19+
<file>WpHtmlSupportRequiredOpenElements.php</file>
20+
<file>WpHtmlTagProcessor.php</file>
21+
<file>WpHtmlTagProcessor-bookmark.php</file>
22+
<!-- <file>WpHtmlProcessor-bookmark.php</file>-->
23+
<!-- <file>WpHtmlTemplate.php</file>-->
24+
<file>WpHtmlTagProcessor-token-scanning.php</file>
25+
<!-- <file>WpHtmlTagProcessor-internals.php</file>-->
26+
<!-- <file>WpHtmlProcessor-stringBuilder.php</file>-->
27+
</testsuite>
28+
</testsuites>
29+
</phpunit>

0 commit comments

Comments
 (0)