Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

BowerRepositoryTest.php 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /*
  3. * This file is part of the Fxp Composer Asset Plugin package.
  4. *
  5. * (c) François Pluchino <francois.pluchino@gmail.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Fxp\Composer\AssetPlugin\Tests\Repository;
  11. use Composer\Config;
  12. use Composer\EventDispatcher\EventDispatcher;
  13. use Composer\IO\IOInterface;
  14. use Fxp\Composer\AssetPlugin\Repository\BowerRepository;
  15. /**
  16. * Tests of Bower repository.
  17. *
  18. * @author François Pluchino <francois.pluchino@gmail.com>
  19. */
  20. class BowerRepositoryTest extends AbstractAssetsRepositoryTest
  21. {
  22. /**
  23. * {@inheritdoc}
  24. */
  25. protected function getType()
  26. {
  27. return 'bower';
  28. }
  29. /**
  30. * {@inheritdoc}
  31. */
  32. protected function getRegistry(array $repoConfig, IOInterface $io, Config $config, EventDispatcher $eventDispatcher = null)
  33. {
  34. return new BowerRepository($repoConfig, $io, $config, $eventDispatcher);
  35. }
  36. /**
  37. * {@inheritdoc}
  38. */
  39. protected function getMockPackageForVcsConfig()
  40. {
  41. return array(
  42. 'url' => 'http://foo.tld',
  43. );
  44. }
  45. /**
  46. * {@inheritdoc}
  47. */
  48. protected function getMockSearchResult($name = 'mock-package')
  49. {
  50. return array(
  51. array(
  52. 'name' => $name,
  53. ),
  54. );
  55. }
  56. }