HelpCommandTest.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /*
  3. * This file is part of PHP CS Fixer.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. * Dariusz Rumiński <dariusz.ruminski@gmail.com>
  7. *
  8. * This source file is subject to the MIT license that is bundled
  9. * with this source code in the file LICENSE.
  10. */
  11. namespace PhpCsFixer\Tests\Console\Command;
  12. use PhpCsFixer\Console\Application;
  13. use PhpCsFixer\Console\Command\HelpCommand;
  14. use PhpCsFixer\Tests\TestCase;
  15. /**
  16. * @internal
  17. *
  18. * @covers \PhpCsFixer\Console\Command\HelpCommand
  19. */
  20. final class HelpCommandTest extends TestCase
  21. {
  22. public function testGetLatestReleaseVersionFromChangeLog()
  23. {
  24. $helpVersion = HelpCommand::getLatestReleaseVersionFromChangeLog();
  25. $appVersion = Application::VERSION;
  26. $this->assertTrue(
  27. version_compare($helpVersion, $appVersion, '<='),
  28. sprintf(
  29. 'Expected version from change log "%s" <= as application version "%s".',
  30. $helpVersion,
  31. $appVersion
  32. )
  33. );
  34. }
  35. }