composer update
This commit is contained in:
parent
f6abc3dce2
commit
71dfaca858
1753 changed files with 45274 additions and 14619 deletions
496
vendor/masterminds/html5/test/HTML5/ElementsTest.php
vendored
496
vendor/masterminds/html5/test/HTML5/ElementsTest.php
vendored
|
@ -1,247 +1,247 @@
|
|||
<?php
|
||||
|
||||
namespace Masterminds\HTML5\Tests;
|
||||
|
||||
use Masterminds\HTML5\Elements;
|
||||
|
||||
class ElementsTest extends TestCase
|
||||
{
|
||||
|
||||
public $html5Elements = array(
|
||||
"a",
|
||||
"abbr",
|
||||
"address",
|
||||
"area",
|
||||
"article",
|
||||
"aside",
|
||||
"audio",
|
||||
"b",
|
||||
"base",
|
||||
"bdi",
|
||||
"bdo",
|
||||
"blockquote",
|
||||
"body",
|
||||
"br",
|
||||
"button",
|
||||
"canvas",
|
||||
"caption",
|
||||
"cite",
|
||||
"code",
|
||||
"col",
|
||||
"colgroup",
|
||||
"command",
|
||||
'a',
|
||||
'abbr',
|
||||
'address',
|
||||
'area',
|
||||
'article',
|
||||
'aside',
|
||||
'audio',
|
||||
'b',
|
||||
'base',
|
||||
'bdi',
|
||||
'bdo',
|
||||
'blockquote',
|
||||
'body',
|
||||
'br',
|
||||
'button',
|
||||
'canvas',
|
||||
'caption',
|
||||
'cite',
|
||||
'code',
|
||||
'col',
|
||||
'colgroup',
|
||||
'command',
|
||||
// "data",
|
||||
"datalist",
|
||||
"dd",
|
||||
"del",
|
||||
"details",
|
||||
"dfn",
|
||||
"dialog",
|
||||
"div",
|
||||
"dl",
|
||||
"dt",
|
||||
"em",
|
||||
"embed",
|
||||
"fieldset",
|
||||
"figcaption",
|
||||
"figure",
|
||||
"footer",
|
||||
"form",
|
||||
"h1",
|
||||
"h2",
|
||||
"h3",
|
||||
"h4",
|
||||
"h5",
|
||||
"h6",
|
||||
"head",
|
||||
"header",
|
||||
"hgroup",
|
||||
"hr",
|
||||
"html",
|
||||
"i",
|
||||
"iframe",
|
||||
"img",
|
||||
"input",
|
||||
"ins",
|
||||
"kbd",
|
||||
"keygen",
|
||||
"label",
|
||||
"legend",
|
||||
"li",
|
||||
"link",
|
||||
"map",
|
||||
"mark",
|
||||
"menu",
|
||||
"meta",
|
||||
"meter",
|
||||
"nav",
|
||||
"noscript",
|
||||
"object",
|
||||
"ol",
|
||||
"optgroup",
|
||||
"option",
|
||||
"output",
|
||||
"p",
|
||||
"param",
|
||||
"pre",
|
||||
"progress",
|
||||
"q",
|
||||
"rp",
|
||||
"rt",
|
||||
"ruby",
|
||||
"s",
|
||||
"samp",
|
||||
"script",
|
||||
"section",
|
||||
"select",
|
||||
"small",
|
||||
"source",
|
||||
"span",
|
||||
"strong",
|
||||
"style",
|
||||
"sub",
|
||||
"summary",
|
||||
"sup",
|
||||
"table",
|
||||
"tbody",
|
||||
"td",
|
||||
"textarea",
|
||||
"tfoot",
|
||||
"th",
|
||||
"thead",
|
||||
"time",
|
||||
"title",
|
||||
"tr",
|
||||
"track",
|
||||
"u",
|
||||
"ul",
|
||||
"var",
|
||||
"video",
|
||||
"wbr"
|
||||
'datalist',
|
||||
'dd',
|
||||
'del',
|
||||
'details',
|
||||
'dfn',
|
||||
'dialog',
|
||||
'div',
|
||||
'dl',
|
||||
'dt',
|
||||
'em',
|
||||
'embed',
|
||||
'fieldset',
|
||||
'figcaption',
|
||||
'figure',
|
||||
'footer',
|
||||
'form',
|
||||
'h1',
|
||||
'h2',
|
||||
'h3',
|
||||
'h4',
|
||||
'h5',
|
||||
'h6',
|
||||
'head',
|
||||
'header',
|
||||
'hgroup',
|
||||
'hr',
|
||||
'html',
|
||||
'i',
|
||||
'iframe',
|
||||
'img',
|
||||
'input',
|
||||
'ins',
|
||||
'kbd',
|
||||
'keygen',
|
||||
'label',
|
||||
'legend',
|
||||
'li',
|
||||
'link',
|
||||
'map',
|
||||
'mark',
|
||||
'menu',
|
||||
'meta',
|
||||
'meter',
|
||||
'nav',
|
||||
'noscript',
|
||||
'object',
|
||||
'ol',
|
||||
'optgroup',
|
||||
'option',
|
||||
'output',
|
||||
'p',
|
||||
'param',
|
||||
'pre',
|
||||
'progress',
|
||||
'q',
|
||||
'rp',
|
||||
'rt',
|
||||
'ruby',
|
||||
's',
|
||||
'samp',
|
||||
'script',
|
||||
'section',
|
||||
'select',
|
||||
'small',
|
||||
'source',
|
||||
'span',
|
||||
'strong',
|
||||
'style',
|
||||
'sub',
|
||||
'summary',
|
||||
'sup',
|
||||
'table',
|
||||
'tbody',
|
||||
'td',
|
||||
'textarea',
|
||||
'tfoot',
|
||||
'th',
|
||||
'thead',
|
||||
'time',
|
||||
'title',
|
||||
'tr',
|
||||
'track',
|
||||
'u',
|
||||
'ul',
|
||||
'var',
|
||||
'video',
|
||||
'wbr',
|
||||
);
|
||||
|
||||
public $mathmlElements = array(
|
||||
"maction",
|
||||
"maligngroup",
|
||||
"malignmark",
|
||||
"math",
|
||||
"menclose",
|
||||
"merror",
|
||||
"mfenced",
|
||||
"mfrac",
|
||||
"mglyph",
|
||||
"mi",
|
||||
"mlabeledtr",
|
||||
"mlongdiv",
|
||||
"mmultiscripts",
|
||||
"mn",
|
||||
"mo",
|
||||
"mover",
|
||||
"mpadded",
|
||||
"mphantom",
|
||||
"mroot",
|
||||
"mrow",
|
||||
"ms",
|
||||
"mscarries",
|
||||
"mscarry",
|
||||
"msgroup",
|
||||
"msline",
|
||||
"mspace",
|
||||
"msqrt",
|
||||
"msrow",
|
||||
"mstack",
|
||||
"mstyle",
|
||||
"msub",
|
||||
"msup",
|
||||
"msubsup",
|
||||
"mtable",
|
||||
"mtd",
|
||||
"mtext",
|
||||
"mtr",
|
||||
"munder",
|
||||
"munderover"
|
||||
'maction',
|
||||
'maligngroup',
|
||||
'malignmark',
|
||||
'math',
|
||||
'menclose',
|
||||
'merror',
|
||||
'mfenced',
|
||||
'mfrac',
|
||||
'mglyph',
|
||||
'mi',
|
||||
'mlabeledtr',
|
||||
'mlongdiv',
|
||||
'mmultiscripts',
|
||||
'mn',
|
||||
'mo',
|
||||
'mover',
|
||||
'mpadded',
|
||||
'mphantom',
|
||||
'mroot',
|
||||
'mrow',
|
||||
'ms',
|
||||
'mscarries',
|
||||
'mscarry',
|
||||
'msgroup',
|
||||
'msline',
|
||||
'mspace',
|
||||
'msqrt',
|
||||
'msrow',
|
||||
'mstack',
|
||||
'mstyle',
|
||||
'msub',
|
||||
'msup',
|
||||
'msubsup',
|
||||
'mtable',
|
||||
'mtd',
|
||||
'mtext',
|
||||
'mtr',
|
||||
'munder',
|
||||
'munderover',
|
||||
);
|
||||
|
||||
public $svgElements = array(
|
||||
"a",
|
||||
"altGlyph",
|
||||
"altGlyphDef",
|
||||
"altGlyphItem",
|
||||
"animate",
|
||||
"animateColor",
|
||||
"animateMotion",
|
||||
"animateTransform",
|
||||
"circle",
|
||||
"clipPath",
|
||||
"color-profile",
|
||||
"cursor",
|
||||
"defs",
|
||||
"desc",
|
||||
"ellipse",
|
||||
"feBlend",
|
||||
"feColorMatrix",
|
||||
"feComponentTransfer",
|
||||
"feComposite",
|
||||
"feConvolveMatrix",
|
||||
"feDiffuseLighting",
|
||||
"feDisplacementMap",
|
||||
"feDistantLight",
|
||||
"feFlood",
|
||||
"feFuncA",
|
||||
"feFuncB",
|
||||
"feFuncG",
|
||||
"feFuncR",
|
||||
"feGaussianBlur",
|
||||
"feImage",
|
||||
"feMerge",
|
||||
"feMergeNode",
|
||||
"feMorphology",
|
||||
"feOffset",
|
||||
"fePointLight",
|
||||
"feSpecularLighting",
|
||||
"feSpotLight",
|
||||
"feTile",
|
||||
"feTurbulence",
|
||||
"filter",
|
||||
"font",
|
||||
"font-face",
|
||||
"font-face-format",
|
||||
"font-face-name",
|
||||
"font-face-src",
|
||||
"font-face-uri",
|
||||
"foreignObject",
|
||||
"g",
|
||||
"glyph",
|
||||
"glyphRef",
|
||||
"hkern",
|
||||
"image",
|
||||
"line",
|
||||
"linearGradient",
|
||||
"marker",
|
||||
"mask",
|
||||
"metadata",
|
||||
"missing-glyph",
|
||||
"mpath",
|
||||
"path",
|
||||
"pattern",
|
||||
"polygon",
|
||||
"polyline",
|
||||
"radialGradient",
|
||||
"rect",
|
||||
"script",
|
||||
"set",
|
||||
"stop",
|
||||
"style",
|
||||
"svg",
|
||||
"switch",
|
||||
"symbol",
|
||||
"text",
|
||||
"textPath",
|
||||
"title",
|
||||
"tref",
|
||||
"tspan",
|
||||
"use",
|
||||
"view",
|
||||
"vkern"
|
||||
'a',
|
||||
'altGlyph',
|
||||
'altGlyphDef',
|
||||
'altGlyphItem',
|
||||
'animate',
|
||||
'animateColor',
|
||||
'animateMotion',
|
||||
'animateTransform',
|
||||
'circle',
|
||||
'clipPath',
|
||||
'color-profile',
|
||||
'cursor',
|
||||
'defs',
|
||||
'desc',
|
||||
'ellipse',
|
||||
'feBlend',
|
||||
'feColorMatrix',
|
||||
'feComponentTransfer',
|
||||
'feComposite',
|
||||
'feConvolveMatrix',
|
||||
'feDiffuseLighting',
|
||||
'feDisplacementMap',
|
||||
'feDistantLight',
|
||||
'feFlood',
|
||||
'feFuncA',
|
||||
'feFuncB',
|
||||
'feFuncG',
|
||||
'feFuncR',
|
||||
'feGaussianBlur',
|
||||
'feImage',
|
||||
'feMerge',
|
||||
'feMergeNode',
|
||||
'feMorphology',
|
||||
'feOffset',
|
||||
'fePointLight',
|
||||
'feSpecularLighting',
|
||||
'feSpotLight',
|
||||
'feTile',
|
||||
'feTurbulence',
|
||||
'filter',
|
||||
'font',
|
||||
'font-face',
|
||||
'font-face-format',
|
||||
'font-face-name',
|
||||
'font-face-src',
|
||||
'font-face-uri',
|
||||
'foreignObject',
|
||||
'g',
|
||||
'glyph',
|
||||
'glyphRef',
|
||||
'hkern',
|
||||
'image',
|
||||
'line',
|
||||
'linearGradient',
|
||||
'marker',
|
||||
'mask',
|
||||
'metadata',
|
||||
'missing-glyph',
|
||||
'mpath',
|
||||
'path',
|
||||
'pattern',
|
||||
'polygon',
|
||||
'polyline',
|
||||
'radialGradient',
|
||||
'rect',
|
||||
'script',
|
||||
'set',
|
||||
'stop',
|
||||
'style',
|
||||
'svg',
|
||||
'switch',
|
||||
'symbol',
|
||||
'text',
|
||||
'textPath',
|
||||
'title',
|
||||
'tref',
|
||||
'tspan',
|
||||
'use',
|
||||
'view',
|
||||
'vkern',
|
||||
);
|
||||
|
||||
public function testIsHtml5Element()
|
||||
|
@ -255,7 +255,7 @@ class ElementsTest extends TestCase
|
|||
$nonhtml5 = array(
|
||||
'foo',
|
||||
'bar',
|
||||
'baz'
|
||||
'baz',
|
||||
);
|
||||
foreach ($nonhtml5 as $element) {
|
||||
$this->assertFalse(Elements::isHtml5Element($element), 'html5 element test failed on: ' . $element);
|
||||
|
@ -269,14 +269,14 @@ class ElementsTest extends TestCase
|
|||
foreach ($this->mathmlElements as $element) {
|
||||
$this->assertTrue(Elements::isMathMLElement($element), 'MathML element test failed on: ' . $element);
|
||||
|
||||
// MathML is case sensetitive so these should all fail.
|
||||
// MathML is case sensitive so these should all fail.
|
||||
$this->assertFalse(Elements::isMathMLElement(strtoupper($element)), 'MathML element test failed on: ' . strtoupper($element));
|
||||
}
|
||||
|
||||
$nonMathML = array(
|
||||
'foo',
|
||||
'bar',
|
||||
'baz'
|
||||
'baz',
|
||||
);
|
||||
foreach ($nonMathML as $element) {
|
||||
$this->assertFalse(Elements::isMathMLElement($element), 'MathML element test failed on: ' . $element);
|
||||
|
@ -288,14 +288,14 @@ class ElementsTest extends TestCase
|
|||
foreach ($this->svgElements as $element) {
|
||||
$this->assertTrue(Elements::isSvgElement($element), 'SVG element test failed on: ' . $element);
|
||||
|
||||
// SVG is case sensetitive so these should all fail.
|
||||
// SVG is case sensitive so these should all fail.
|
||||
$this->assertFalse(Elements::isSvgElement(strtoupper($element)), 'SVG element test failed on: ' . strtoupper($element));
|
||||
}
|
||||
|
||||
$nonSVG = array(
|
||||
'foo',
|
||||
'bar',
|
||||
'baz'
|
||||
'baz',
|
||||
);
|
||||
foreach ($nonSVG as $element) {
|
||||
$this->assertFalse(Elements::isSvgElement($element), 'SVG element test failed on: ' . $element);
|
||||
|
@ -313,17 +313,17 @@ class ElementsTest extends TestCase
|
|||
foreach ($this->mathmlElements as $element) {
|
||||
$this->assertTrue(Elements::isElement($element), 'MathML element test failed on: ' . $element);
|
||||
|
||||
// MathML is case sensetitive so these should all fail.
|
||||
// MathML is case sensitive so these should all fail.
|
||||
$this->assertFalse(Elements::isElement(strtoupper($element)), 'MathML element test failed on: ' . strtoupper($element));
|
||||
}
|
||||
|
||||
foreach ($this->svgElements as $element) {
|
||||
$this->assertTrue(Elements::isElement($element), 'SVG element test failed on: ' . $element);
|
||||
|
||||
// SVG is case sensetitive so these should all fail. But, there is duplication
|
||||
// html5 and SVG. Since html5 is case insensetitive we need to make sure
|
||||
// SVG is case sensitive so these should all fail. But, there is duplication
|
||||
// html5 and SVG. Since html5 is case insensitive we need to make sure
|
||||
// it's not a html5 element first.
|
||||
if (! in_array($element, $this->html5Elements)) {
|
||||
if (!in_array($element, $this->html5Elements)) {
|
||||
$this->assertFalse(Elements::isElement(strtoupper($element)), 'SVG element test failed on: ' . strtoupper($element));
|
||||
}
|
||||
}
|
||||
|
@ -331,7 +331,7 @@ class ElementsTest extends TestCase
|
|||
$nonhtml5 = array(
|
||||
'foo',
|
||||
'bar',
|
||||
'baz'
|
||||
'baz',
|
||||
);
|
||||
foreach ($nonhtml5 as $element) {
|
||||
$this->assertFalse(Elements::isElement($element), 'html5 element test failed on: ' . $element);
|
||||
|
@ -348,10 +348,10 @@ class ElementsTest extends TestCase
|
|||
$nonhtml5 = array(
|
||||
'foo',
|
||||
'bar',
|
||||
'baz'
|
||||
'baz',
|
||||
);
|
||||
foreach ($nonhtml5 as $element) {
|
||||
$this->assertFalse(Elements::element($element));
|
||||
$this->assertEquals(0, Elements::element($element));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -373,7 +373,7 @@ class ElementsTest extends TestCase
|
|||
'embed',
|
||||
'frame',
|
||||
'hr',
|
||||
'img'
|
||||
'img',
|
||||
);
|
||||
|
||||
foreach ($voidElements as $element) {
|
||||
|
@ -383,7 +383,7 @@ class ElementsTest extends TestCase
|
|||
$nonVoid = array(
|
||||
'span',
|
||||
'a',
|
||||
'div'
|
||||
'div',
|
||||
);
|
||||
foreach ($nonVoid as $tag) {
|
||||
$this->assertFalse(Elements::isA($tag, Elements::VOID_TAG), 'Void element test failed on: ' . $tag);
|
||||
|
@ -421,7 +421,7 @@ class ElementsTest extends TestCase
|
|||
'table',
|
||||
'tfoot',
|
||||
'ul',
|
||||
'video'
|
||||
'video',
|
||||
);
|
||||
|
||||
foreach ($blockTags as $tag) {
|
||||
|
@ -431,7 +431,7 @@ class ElementsTest extends TestCase
|
|||
$nonBlockTags = array(
|
||||
'span',
|
||||
'img',
|
||||
'label'
|
||||
'label',
|
||||
);
|
||||
foreach ($nonBlockTags as $tag) {
|
||||
$this->assertFalse(Elements::isA($tag, Elements::BLOCK_TAG), 'Block tag test failed on: ' . $tag);
|
||||
|
@ -446,7 +446,7 @@ class ElementsTest extends TestCase
|
|||
'BAR' => 'bar',
|
||||
'fespecularlighting' => 'feSpecularLighting',
|
||||
'bAz' => 'baz',
|
||||
'foreignobject' => 'foreignObject'
|
||||
'foreignobject' => 'foreignObject',
|
||||
);
|
||||
|
||||
foreach ($tests as $input => $expected) {
|
||||
|
@ -462,7 +462,7 @@ class ElementsTest extends TestCase
|
|||
'BAR' => 'bar',
|
||||
'limitingconeangle' => 'limitingConeAngle',
|
||||
'bAz' => 'baz',
|
||||
'patterncontentunits' => 'patternContentUnits'
|
||||
'patterncontentunits' => 'patternContentUnits',
|
||||
);
|
||||
|
||||
foreach ($tests as $input => $expected) {
|
||||
|
@ -475,7 +475,7 @@ class ElementsTest extends TestCase
|
|||
$tests = array(
|
||||
'foo' => 'foo',
|
||||
'definitionurl' => 'definitionURL',
|
||||
'BAR' => 'bar'
|
||||
'BAR' => 'bar',
|
||||
);
|
||||
|
||||
foreach ($tests as $input => $expected) {
|
||||
|
|
Reference in a new issue