Skip to content

Commit

Permalink
Merge branch '6.2' into 6.3
Browse files Browse the repository at this point in the history
* 6.2:
  minor #49253 [PHPUnit 10] Use `TestCase` suffix for abstract tests in `/Tests/` (OskarStark)
  [Intl] Generate all emoji short name returned by slack api
  [Serializer] Fix CsvEncoder decode on empty data
  [Tests] Migrate data providers to static ones
  stop using assertObjectHasAttribute()/assertObjectHasNotAttribute()
  [Cache] Fix Redis proxies
  [Dotenv] Fix phpdoc Dotenv
  [Config] Fix phpdoc nullable
  Replace deprecated/removed way to configure enabled_locales
  fix typo
  Fix some typos
  • Loading branch information
nicolas-grekas committed Feb 7, 2023
2 parents 36cd558 + 7cb4a07 commit cda0fa7
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Tests/Node/AbstractNodeTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function testSpecificityValue(NodeInterface $node, $value)
$this->assertEquals($value, $node->getSpecificity()->getValue());
}

abstract public function getToStringConversionTestData();
abstract public static function getToStringConversionTestData();

abstract public function getSpecificityValueTestData();
abstract public static function getSpecificityValueTestData();
}
4 changes: 2 additions & 2 deletions Tests/Node/AttributeNodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

class AttributeNodeTest extends AbstractNodeTestCase
{
public function getToStringConversionTestData()
public static function getToStringConversionTestData()
{
return [
[new AttributeNode(new ElementNode(), null, 'attribute', 'exists', null), 'Attribute[Element[*][attribute]]'],
Expand All @@ -25,7 +25,7 @@ public function getToStringConversionTestData()
];
}

public function getSpecificityValueTestData()
public static function getSpecificityValueTestData()
{
return [
[new AttributeNode(new ElementNode(), null, 'attribute', 'exists', null), 10],
Expand Down
4 changes: 2 additions & 2 deletions Tests/Node/ClassNodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

class ClassNodeTest extends AbstractNodeTestCase
{
public function getToStringConversionTestData()
public static function getToStringConversionTestData()
{
return [
[new ClassNode(new ElementNode(), 'class'), 'Class[Element[*].class]'],
];
}

public function getSpecificityValueTestData()
public static function getSpecificityValueTestData()
{
return [
[new ClassNode(new ElementNode(), 'class'), 10],
Expand Down
4 changes: 2 additions & 2 deletions Tests/Node/CombinedSelectorNodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@

class CombinedSelectorNodeTest extends AbstractNodeTestCase
{
public function getToStringConversionTestData()
public static function getToStringConversionTestData()
{
return [
[new CombinedSelectorNode(new ElementNode(), '>', new ElementNode()), 'CombinedSelector[Element[*] > Element[*]]'],
[new CombinedSelectorNode(new ElementNode(), ' ', new ElementNode()), 'CombinedSelector[Element[*] <followed> Element[*]]'],
];
}

public function getSpecificityValueTestData()
public static function getSpecificityValueTestData()
{
return [
[new CombinedSelectorNode(new ElementNode(), '>', new ElementNode()), 0],
Expand Down
4 changes: 2 additions & 2 deletions Tests/Node/ElementNodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class ElementNodeTest extends AbstractNodeTestCase
{
public function getToStringConversionTestData()
public static function getToStringConversionTestData()
{
return [
[new ElementNode(), 'Element[*]'],
Expand All @@ -24,7 +24,7 @@ public function getToStringConversionTestData()
];
}

public function getSpecificityValueTestData()
public static function getSpecificityValueTestData()
{
return [
[new ElementNode(), 0],
Expand Down
4 changes: 2 additions & 2 deletions Tests/Node/FunctionNodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

class FunctionNodeTest extends AbstractNodeTestCase
{
public function getToStringConversionTestData()
public static function getToStringConversionTestData()
{
return [
[new FunctionNode(new ElementNode(), 'function'), 'Function[Element[*]:function()]'],
Expand All @@ -31,7 +31,7 @@ public function getToStringConversionTestData()
];
}

public function getSpecificityValueTestData()
public static function getSpecificityValueTestData()
{
return [
[new FunctionNode(new ElementNode(), 'function'), 10],
Expand Down
4 changes: 2 additions & 2 deletions Tests/Node/HashNodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

class HashNodeTest extends AbstractNodeTestCase
{
public function getToStringConversionTestData()
public static function getToStringConversionTestData()
{
return [
[new HashNode(new ElementNode(), 'id'), 'Hash[Element[*]#id]'],
];
}

public function getSpecificityValueTestData()
public static function getSpecificityValueTestData()
{
return [
[new HashNode(new ElementNode(), 'id'), 100],
Expand Down
4 changes: 2 additions & 2 deletions Tests/Node/NegationNodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@

class NegationNodeTest extends AbstractNodeTestCase
{
public function getToStringConversionTestData()
public static function getToStringConversionTestData()
{
return [
[new NegationNode(new ElementNode(), new ClassNode(new ElementNode(), 'class')), 'Negation[Element[*]:not(Class[Element[*].class])]'],
];
}

public function getSpecificityValueTestData()
public static function getSpecificityValueTestData()
{
return [
[new NegationNode(new ElementNode(), new ClassNode(new ElementNode(), 'class')), 10],
Expand Down
4 changes: 2 additions & 2 deletions Tests/Node/PseudoNodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

class PseudoNodeTest extends AbstractNodeTestCase
{
public function getToStringConversionTestData()
public static function getToStringConversionTestData()
{
return [
[new PseudoNode(new ElementNode(), 'pseudo'), 'Pseudo[Element[*]:pseudo]'],
];
}

public function getSpecificityValueTestData()
public static function getSpecificityValueTestData()
{
return [
[new PseudoNode(new ElementNode(), 'pseudo'), 10],
Expand Down
4 changes: 2 additions & 2 deletions Tests/Node/SelectorNodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@

class SelectorNodeTest extends AbstractNodeTestCase
{
public function getToStringConversionTestData()
public static function getToStringConversionTestData()
{
return [
[new SelectorNode(new ElementNode()), 'Selector[Element[*]]'],
[new SelectorNode(new ElementNode(), 'pseudo'), 'Selector[Element[*]::pseudo]'],
];
}

public function getSpecificityValueTestData()
public static function getSpecificityValueTestData()
{
return [
[new SelectorNode(new ElementNode()), 0],
Expand Down

0 comments on commit cda0fa7

Please sign in to comment.