Skip to content

Commit bee9b6f

Browse files
committed
updating test
1 parent ce7febd commit bee9b6f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/Update/RecipePatcherTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ protected function setUp(): void
3333
*/
3434
public function testGeneratePatch(array $originalFiles, array $newFiles, string $expectedPatch)
3535
{
36+
$this->getFilesystem()->remove(FLEX_TEST_DIR);
37+
$this->getFilesystem()->mkdir(FLEX_TEST_DIR);
38+
// original files need to be present to avoid patcher thinking they were deleting and skipping patch
39+
foreach ($originalFiles as $file => $contents) {
40+
touch(FLEX_TEST_DIR.'/'.$file);
41+
}
42+
3643
$patcher = new RecipePatcher(FLEX_TEST_DIR, $this->createMock(IOInterface::class));
3744

3845
$patch = $patcher->generatePatch($originalFiles, $newFiles);

0 commit comments

Comments
 (0)