mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-11 18:06:46 +00:00
minor #4273 Fix tests that don't perform assertions (derrabus)
This PR was merged into the 3.x branch.
Discussion
----------
Fix tests that don't perform assertions
The method `doesNotPerformAssertions()` is a getter that tells us if the current test is expected to perform assertions. I think the method that the author _wanted_ to call is `expectNotToPerformAssertions()` which tells PHPUnit not to complain if the current test does not perform any assertions.
Commits
-------
db22abfa Fix tests that don't perform assertions
This commit is contained in:
@@ -475,7 +475,7 @@ class ExpressionParserTest extends TestCase
|
||||
$parser = new Parser($env);
|
||||
|
||||
$parser->parse($env->tokenize(new Source('{{ foo() }}', 'index')));
|
||||
$this->doesNotPerformAssertions();
|
||||
$this->expectNotToPerformAssertions();
|
||||
}
|
||||
|
||||
public function testNotReadyFilterWithNoConstructor()
|
||||
@@ -485,7 +485,7 @@ class ExpressionParserTest extends TestCase
|
||||
$parser = new Parser($env);
|
||||
|
||||
$parser->parse($env->tokenize(new Source('{{ 1|foo }}', 'index')));
|
||||
$this->doesNotPerformAssertions();
|
||||
$this->expectNotToPerformAssertions();
|
||||
}
|
||||
|
||||
public function testNotReadyTestWithNoConstructor()
|
||||
@@ -495,7 +495,7 @@ class ExpressionParserTest extends TestCase
|
||||
$parser = new Parser($env);
|
||||
|
||||
$parser->parse($env->tokenize(new Source('{{ 1 is foo }}', 'index')));
|
||||
$this->doesNotPerformAssertions();
|
||||
$this->expectNotToPerformAssertions();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -550,7 +550,7 @@ class ExpressionParserTest extends TestCase
|
||||
$parser = new Parser($env);
|
||||
|
||||
$parser->parse($env->tokenize(new Source('{{ foo() }}', 'index')));
|
||||
$this->doesNotPerformAssertions();
|
||||
$this->expectNotToPerformAssertions();
|
||||
}
|
||||
|
||||
public function testReadyFilter()
|
||||
@@ -560,7 +560,7 @@ class ExpressionParserTest extends TestCase
|
||||
$parser = new Parser($env);
|
||||
|
||||
$parser->parse($env->tokenize(new Source('{{ 1|foo }}', 'index')));
|
||||
$this->doesNotPerformAssertions();
|
||||
$this->expectNotToPerformAssertions();
|
||||
}
|
||||
|
||||
public function testReadyTest()
|
||||
@@ -570,7 +570,7 @@ class ExpressionParserTest extends TestCase
|
||||
$parser = new Parser($env);
|
||||
|
||||
$parser->parse($env->tokenize(new Source('{{ 1 is foo }}', 'index')));
|
||||
$this->doesNotPerformAssertions();
|
||||
$this->expectNotToPerformAssertions();
|
||||
}
|
||||
|
||||
public function testTwoWordTestPrecedence()
|
||||
@@ -581,7 +581,7 @@ class ExpressionParserTest extends TestCase
|
||||
$parser = new Parser($env);
|
||||
|
||||
$parser->parse($env->tokenize(new Source('{{ 1 is empty element }}', 'index')));
|
||||
$this->doesNotPerformAssertions();
|
||||
$this->expectNotToPerformAssertions();
|
||||
}
|
||||
|
||||
private static function createNameExpression(string $name, array $attributes): NameExpression
|
||||
|
||||
Reference in New Issue
Block a user