Updated Rector to commit 000514186cc2843e1bca0ee4f655f5615ac191ab

000514186c Show the fixture file on failing tests (#3577)
This commit is contained in:
Tomas Votruba 2023-04-08 09:56:01 +00:00
parent aaddfe2522
commit 93412b6620
5 changed files with 16 additions and 14 deletions

View File

@ -137,12 +137,14 @@ abstract class AbstractRectorTestCase extends \Rector\Testing\PHPUnit\AbstractTe
if ($this->removedAndAddedFilesCollector->isFileRemoved($originalFilePath)) {
return;
}
$fixtureFilename = \basename($fixtureFilePath);
$failureMessage = \sprintf('Failed on fixture file "%s"', $fixtureFilename);
try {
$this->assertSame($expectedFileContents, $changedContent);
$this->assertSame($expectedFileContents, $changedContent, $failureMessage);
} catch (ExpectationFailedException $exception) {
FixtureFileUpdater::updateFixtureContent($originalFilePath, $changedContent, $fixtureFilePath);
// if not exact match, check the regex version (useful for generated hashes/uuids in the code)
$this->assertStringMatchesFormat($expectedFileContents, $changedContent);
$this->assertStringMatchesFormat($expectedFileContents, $changedContent, $failureMessage);
}
}
private function processFilePath(string $filePath) : string

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '59cdfc8d814b094bffd814f4679c828cd45c7ec9';
public const PACKAGE_VERSION = '000514186cc2843e1bca0ee4f655f5615ac191ab';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-04-08 08:15:49';
public const RELEASE_DATE = '2023-04-08 10:51:43';
/**
* @var int
*/

2
vendor/autoload.php vendored
View File

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit4df32a3c45bbdb27f25006bd04e40b5a::getLoader();
return ComposerAutoloaderInitbf222daf2ece29cc72cfda7b3ddc2231::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit4df32a3c45bbdb27f25006bd04e40b5a
class ComposerAutoloaderInitbf222daf2ece29cc72cfda7b3ddc2231
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInit4df32a3c45bbdb27f25006bd04e40b5a
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit4df32a3c45bbdb27f25006bd04e40b5a', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitbf222daf2ece29cc72cfda7b3ddc2231', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit4df32a3c45bbdb27f25006bd04e40b5a', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitbf222daf2ece29cc72cfda7b3ddc2231', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit4df32a3c45bbdb27f25006bd04e40b5a::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitbf222daf2ece29cc72cfda7b3ddc2231::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit4df32a3c45bbdb27f25006bd04e40b5a::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInitbf222daf2ece29cc72cfda7b3ddc2231::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit4df32a3c45bbdb27f25006bd04e40b5a
class ComposerStaticInitbf222daf2ece29cc72cfda7b3ddc2231
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -3135,9 +3135,9 @@ class ComposerStaticInit4df32a3c45bbdb27f25006bd04e40b5a
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit4df32a3c45bbdb27f25006bd04e40b5a::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit4df32a3c45bbdb27f25006bd04e40b5a::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit4df32a3c45bbdb27f25006bd04e40b5a::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitbf222daf2ece29cc72cfda7b3ddc2231::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitbf222daf2ece29cc72cfda7b3ddc2231::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitbf222daf2ece29cc72cfda7b3ddc2231::$classMap;
}, null, ClassLoader::class);
}