bootKernel(RectorKernel::class); $this->fileHashComputer = self::$container->get(FileHashComputer::class); } /** * @dataProvider provideDataForIdenticalHash() */ public function testHashIsIdentical(string $firstConfig, string $secondConfig): void { $configAHash = $this->fileHashComputer->compute($firstConfig); $configBHash = $this->fileHashComputer->compute($secondConfig); $this->assertSame($configAHash, $configBHash); } public function provideDataForIdenticalHash(): Iterator { yield [__DIR__ . '/Source/config_content_a.yaml', __DIR__ . '/Source/config_content_b.yaml']; yield [__DIR__ . '/Source/Import/import_a.yaml', __DIR__ . '/Source/Import/import_b.yaml']; } public function testInvalidType(): void { $this->expectException(ShouldNotHappenException::class); $this->fileHashComputer->compute(__DIR__ . '/Source/file.php'); } }