Skip to content

Commit

Permalink
Simplify tests: convert it into a simple smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
bocharsky-bw committed Feb 16, 2022
1 parent 6e64745 commit 8ad30eb
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions tests/Maker/MakeResetPasswordTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,33 +89,6 @@ public function getTestDetails()
]);

$this->assertStringContainsString('Success', $output);

$generatedFiles = [
'src/Controller/ResetPasswordController.php',
'src/Entity/ResetPasswordRequest.php',
'src/Form/ChangePasswordFormType.php',
'src/Form/ResetPasswordRequestFormType.php',
'src/Repository/ResetPasswordRequestRepository.php',
'templates/reset_password/check_email.html.twig',
'templates/reset_password/email.html.twig',
'templates/reset_password/request.html.twig',
'templates/reset_password/reset.html.twig',
];

foreach ($generatedFiles as $file) {
$this->assertFileExists($runner->getPath($file));
}

$configFileContents = file_get_contents($runner->getPath('config/packages/reset_password.yaml'));

// Flex recipe adds comments in reset_password.yaml, check file was replaced by maker
$this->assertStringNotContainsString('#', $configFileContents);

$resetPasswordConfig = $runner->readYaml('config/packages/reset_password.yaml');

$this->assertSame('App\Repository\ResetPasswordRequestRepository', $resetPasswordConfig['symfonycasts_reset_password']['request_password_repository']);

$this->runResetPasswordTest($runner, 'it_generates_with_normal_setup.php');
}),
];

Expand Down

0 comments on commit 8ad30eb

Please sign in to comment.