Update composer dependencies

This commit is contained in:
Chris
2019-06-11 12:29:32 +01:00
parent 7d6df3843b
commit 1f608b1c21
1835 changed files with 74500 additions and 27482 deletions

View File

@@ -18,20 +18,20 @@ class AttributeNodeTest extends AbstractNodeTest
{
public function getToStringConversionTestData()
{
return array(
array(new AttributeNode(new ElementNode(), null, 'attribute', 'exists', null), 'Attribute[Element[*][attribute]]'),
array(new AttributeNode(new ElementNode(), null, 'attribute', '$=', 'value'), "Attribute[Element[*][attribute $= 'value']]"),
array(new AttributeNode(new ElementNode(), 'namespace', 'attribute', '$=', 'value'), "Attribute[Element[*][namespace|attribute $= 'value']]"),
);
return [
[new AttributeNode(new ElementNode(), null, 'attribute', 'exists', null), 'Attribute[Element[*][attribute]]'],
[new AttributeNode(new ElementNode(), null, 'attribute', '$=', 'value'), "Attribute[Element[*][attribute $= 'value']]"],
[new AttributeNode(new ElementNode(), 'namespace', 'attribute', '$=', 'value'), "Attribute[Element[*][namespace|attribute $= 'value']]"],
];
}
public function getSpecificityValueTestData()
{
return array(
array(new AttributeNode(new ElementNode(), null, 'attribute', 'exists', null), 10),
array(new AttributeNode(new ElementNode(null, 'element'), null, 'attribute', 'exists', null), 11),
array(new AttributeNode(new ElementNode(), null, 'attribute', '$=', 'value'), 10),
array(new AttributeNode(new ElementNode(), 'namespace', 'attribute', '$=', 'value'), 10),
);
return [
[new AttributeNode(new ElementNode(), null, 'attribute', 'exists', null), 10],
[new AttributeNode(new ElementNode(null, 'element'), null, 'attribute', 'exists', null), 11],
[new AttributeNode(new ElementNode(), null, 'attribute', '$=', 'value'), 10],
[new AttributeNode(new ElementNode(), 'namespace', 'attribute', '$=', 'value'), 10],
];
}
}

View File

@@ -18,16 +18,16 @@ class ClassNodeTest extends AbstractNodeTest
{
public function getToStringConversionTestData()
{
return array(
array(new ClassNode(new ElementNode(), 'class'), 'Class[Element[*].class]'),
);
return [
[new ClassNode(new ElementNode(), 'class'), 'Class[Element[*].class]'],
];
}
public function getSpecificityValueTestData()
{
return array(
array(new ClassNode(new ElementNode(), 'class'), 10),
array(new ClassNode(new ElementNode(null, 'element'), 'class'), 11),
);
return [
[new ClassNode(new ElementNode(), 'class'), 10],
[new ClassNode(new ElementNode(null, 'element'), 'class'), 11],
];
}
}

View File

@@ -18,18 +18,18 @@ class CombinedSelectorNodeTest extends AbstractNodeTest
{
public function getToStringConversionTestData()
{
return array(
array(new CombinedSelectorNode(new ElementNode(), '>', new ElementNode()), 'CombinedSelector[Element[*] > Element[*]]'),
array(new CombinedSelectorNode(new ElementNode(), ' ', new ElementNode()), 'CombinedSelector[Element[*] <followed> Element[*]]'),
);
return [
[new CombinedSelectorNode(new ElementNode(), '>', new ElementNode()), 'CombinedSelector[Element[*] > Element[*]]'],
[new CombinedSelectorNode(new ElementNode(), ' ', new ElementNode()), 'CombinedSelector[Element[*] <followed> Element[*]]'],
];
}
public function getSpecificityValueTestData()
{
return array(
array(new CombinedSelectorNode(new ElementNode(), '>', new ElementNode()), 0),
array(new CombinedSelectorNode(new ElementNode(null, 'element'), '>', new ElementNode()), 1),
array(new CombinedSelectorNode(new ElementNode(null, 'element'), '>', new ElementNode(null, 'element')), 2),
);
return [
[new CombinedSelectorNode(new ElementNode(), '>', new ElementNode()), 0],
[new CombinedSelectorNode(new ElementNode(null, 'element'), '>', new ElementNode()), 1],
[new CombinedSelectorNode(new ElementNode(null, 'element'), '>', new ElementNode(null, 'element')), 2],
];
}
}

View File

@@ -17,19 +17,19 @@ class ElementNodeTest extends AbstractNodeTest
{
public function getToStringConversionTestData()
{
return array(
array(new ElementNode(), 'Element[*]'),
array(new ElementNode(null, 'element'), 'Element[element]'),
array(new ElementNode('namespace', 'element'), 'Element[namespace|element]'),
);
return [
[new ElementNode(), 'Element[*]'],
[new ElementNode(null, 'element'), 'Element[element]'],
[new ElementNode('namespace', 'element'), 'Element[namespace|element]'],
];
}
public function getSpecificityValueTestData()
{
return array(
array(new ElementNode(), 0),
array(new ElementNode(null, 'element'), 1),
array(new ElementNode('namespace', 'element'), 1),
);
return [
[new ElementNode(), 0],
[new ElementNode(null, 'element'), 1],
[new ElementNode('namespace', 'element'), 1],
];
}
}

View File

@@ -19,29 +19,29 @@ class FunctionNodeTest extends AbstractNodeTest
{
public function getToStringConversionTestData()
{
return array(
array(new FunctionNode(new ElementNode(), 'function'), 'Function[Element[*]:function()]'),
array(new FunctionNode(new ElementNode(), 'function', array(
return [
[new FunctionNode(new ElementNode(), 'function'), 'Function[Element[*]:function()]'],
[new FunctionNode(new ElementNode(), 'function', [
new Token(Token::TYPE_IDENTIFIER, 'value', 0),
)), "Function[Element[*]:function(['value'])]"),
array(new FunctionNode(new ElementNode(), 'function', array(
]), "Function[Element[*]:function(['value'])]"],
[new FunctionNode(new ElementNode(), 'function', [
new Token(Token::TYPE_STRING, 'value1', 0),
new Token(Token::TYPE_NUMBER, 'value2', 0),
)), "Function[Element[*]:function(['value1', 'value2'])]"),
);
]), "Function[Element[*]:function(['value1', 'value2'])]"],
];
}
public function getSpecificityValueTestData()
{
return array(
array(new FunctionNode(new ElementNode(), 'function'), 10),
array(new FunctionNode(new ElementNode(), 'function', array(
return [
[new FunctionNode(new ElementNode(), 'function'), 10],
[new FunctionNode(new ElementNode(), 'function', [
new Token(Token::TYPE_IDENTIFIER, 'value', 0),
)), 10),
array(new FunctionNode(new ElementNode(), 'function', array(
]), 10],
[new FunctionNode(new ElementNode(), 'function', [
new Token(Token::TYPE_STRING, 'value1', 0),
new Token(Token::TYPE_NUMBER, 'value2', 0),
)), 10),
);
]), 10],
];
}
}

View File

@@ -18,16 +18,16 @@ class HashNodeTest extends AbstractNodeTest
{
public function getToStringConversionTestData()
{
return array(
array(new HashNode(new ElementNode(), 'id'), 'Hash[Element[*]#id]'),
);
return [
[new HashNode(new ElementNode(), 'id'), 'Hash[Element[*]#id]'],
];
}
public function getSpecificityValueTestData()
{
return array(
array(new HashNode(new ElementNode(), 'id'), 100),
array(new HashNode(new ElementNode(null, 'id'), 'class'), 101),
);
return [
[new HashNode(new ElementNode(), 'id'), 100],
[new HashNode(new ElementNode(null, 'id'), 'class'), 101],
];
}
}

View File

@@ -19,15 +19,15 @@ class NegationNodeTest extends AbstractNodeTest
{
public function getToStringConversionTestData()
{
return array(
array(new NegationNode(new ElementNode(), new ClassNode(new ElementNode(), 'class')), 'Negation[Element[*]:not(Class[Element[*].class])]'),
);
return [
[new NegationNode(new ElementNode(), new ClassNode(new ElementNode(), 'class')), 'Negation[Element[*]:not(Class[Element[*].class])]'],
];
}
public function getSpecificityValueTestData()
{
return array(
array(new NegationNode(new ElementNode(), new ClassNode(new ElementNode(), 'class')), 10),
);
return [
[new NegationNode(new ElementNode(), new ClassNode(new ElementNode(), 'class')), 10],
];
}
}

View File

@@ -18,15 +18,15 @@ class PseudoNodeTest extends AbstractNodeTest
{
public function getToStringConversionTestData()
{
return array(
array(new PseudoNode(new ElementNode(), 'pseudo'), 'Pseudo[Element[*]:pseudo]'),
);
return [
[new PseudoNode(new ElementNode(), 'pseudo'), 'Pseudo[Element[*]:pseudo]'],
];
}
public function getSpecificityValueTestData()
{
return array(
array(new PseudoNode(new ElementNode(), 'pseudo'), 10),
);
return [
[new PseudoNode(new ElementNode(), 'pseudo'), 10],
];
}
}

View File

@@ -18,17 +18,17 @@ class SelectorNodeTest extends AbstractNodeTest
{
public function getToStringConversionTestData()
{
return array(
array(new SelectorNode(new ElementNode()), 'Selector[Element[*]]'),
array(new SelectorNode(new ElementNode(), 'pseudo'), 'Selector[Element[*]::pseudo]'),
);
return [
[new SelectorNode(new ElementNode()), 'Selector[Element[*]]'],
[new SelectorNode(new ElementNode(), 'pseudo'), 'Selector[Element[*]::pseudo]'],
];
}
public function getSpecificityValueTestData()
{
return array(
array(new SelectorNode(new ElementNode()), 0),
array(new SelectorNode(new ElementNode(), 'pseudo'), 1),
);
return [
[new SelectorNode(new ElementNode()), 0],
[new SelectorNode(new ElementNode(), 'pseudo'), 1],
];
}
}

View File

@@ -30,13 +30,13 @@ class SpecificityTest extends TestCase
public function getValueTestData()
{
return array(
array(new Specificity(0, 0, 0), 0),
array(new Specificity(0, 0, 2), 2),
array(new Specificity(0, 3, 0), 30),
array(new Specificity(4, 0, 0), 400),
array(new Specificity(4, 3, 2), 432),
);
return [
[new Specificity(0, 0, 0), 0],
[new Specificity(0, 0, 2), 2],
[new Specificity(0, 3, 0), 30],
[new Specificity(4, 0, 0), 400],
[new Specificity(4, 3, 2), 432],
];
}
/** @dataProvider getCompareTestData */
@@ -47,17 +47,17 @@ class SpecificityTest extends TestCase
public function getCompareTestData()
{
return array(
array(new Specificity(0, 0, 0), new Specificity(0, 0, 0), 0),
array(new Specificity(0, 0, 1), new Specificity(0, 0, 1), 0),
array(new Specificity(0, 0, 2), new Specificity(0, 0, 1), 1),
array(new Specificity(0, 0, 2), new Specificity(0, 0, 3), -1),
array(new Specificity(0, 4, 0), new Specificity(0, 4, 0), 0),
array(new Specificity(0, 6, 0), new Specificity(0, 5, 11), 1),
array(new Specificity(0, 7, 0), new Specificity(0, 8, 0), -1),
array(new Specificity(9, 0, 0), new Specificity(9, 0, 0), 0),
array(new Specificity(11, 0, 0), new Specificity(10, 11, 0), 1),
array(new Specificity(12, 11, 0), new Specificity(13, 0, 0), -1),
);
return [
[new Specificity(0, 0, 0), new Specificity(0, 0, 0), 0],
[new Specificity(0, 0, 1), new Specificity(0, 0, 1), 0],
[new Specificity(0, 0, 2), new Specificity(0, 0, 1), 1],
[new Specificity(0, 0, 2), new Specificity(0, 0, 3), -1],
[new Specificity(0, 4, 0), new Specificity(0, 4, 0), 0],
[new Specificity(0, 6, 0), new Specificity(0, 5, 11), 1],
[new Specificity(0, 7, 0), new Specificity(0, 8, 0), -1],
[new Specificity(9, 0, 0), new Specificity(9, 0, 0), 0],
[new Specificity(11, 0, 0), new Specificity(10, 11, 0), 1],
[new Specificity(12, 11, 0), new Specificity(13, 0, 0), -1],
];
}
}