Skip to content

Commit

Permalink
Merge branch '9.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Aug 5, 2020
2 parents bec8f0b + 5ac09f3 commit 005b4e5
Show file tree
Hide file tree
Showing 2 changed files with 2,278 additions and 2,273 deletions.
4 changes: 4 additions & 0 deletions build/scripts/generate-global-assert-wrappers.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
}

$buffer .= "\n";
$buffer .= "if (!\defined('__PHPUNIT_GLOBAL_ASSERT_WRAPPERS__')) {\n";

foreach ($class->getMethods() as $method) {
if (\strpos($method->getName(), 'assert') !== 0) {
Expand All @@ -85,6 +86,7 @@
["*\n * @see Assert::" . $method->getName() . "\n */", ' *'],
$method->getDocComment()
);

$signature = \str_replace('public static ', '', \trim($lines[$method->getStartLine() - 1]));
$body = "{\n Assert::" . $method->getName() . "(...\\func_get_args());\n}";
$buffer .= "$docComment\n$signature\n$body\n\n";
Expand Down Expand Up @@ -209,4 +211,6 @@ function onConsecutiveCalls(): ConsecutiveCallsStub
}
';

$buffer .= "\ndefine('__PHPUNIT_GLOBAL_ASSERT_WRAPPERS__', true);\n}";

\file_put_contents(__DIR__ . '/../../src/Framework/Assert/Functions.php', $buffer);
Loading

0 comments on commit 005b4e5

Please sign in to comment.