NullCacheManagerTest.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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\Cache;
  12. use PhpCsFixer\Cache\NullCacheManager;
  13. /**
  14. * @author Andreas Möller <am@localheinz.com>
  15. *
  16. * @internal
  17. *
  18. * @covers \PhpCsFixer\Cache\NullCacheManager
  19. */
  20. final class NullCacheManagerTest extends \PHPUnit_Framework_TestCase
  21. {
  22. public function testIsFinal()
  23. {
  24. $reflection = new \ReflectionClass(\PhpCsFixer\Cache\NullCacheManager::class);
  25. $this->assertTrue($reflection->isFinal());
  26. }
  27. public function testImplementsCacheManagerInterface()
  28. {
  29. $reflection = new \ReflectionClass(\PhpCsFixer\Cache\NullCacheManager::class);
  30. $this->assertTrue($reflection->implementsInterface(\PhpCsFixer\Cache\CacheManagerInterface::class));
  31. }
  32. public function testNeedFixingReturnsTrue()
  33. {
  34. $manager = new NullCacheManager();
  35. $this->assertTrue($manager->needFixing('foo.php', 'bar'));
  36. }
  37. }