You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.1KB

  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\Event;
  11. use Fxp\Composer\AssetPlugin\AssetEvents;
  12. use Fxp\Composer\AssetPlugin\Event\VcsRepositoryEvent;
  13. /**
  14. * Tests for the vcs repository event.
  15. *
  16. * @author François Pluchino <francois.pluchino@gmail.com>
  17. */
  18. class VcsRepositoryEventTest extends \PHPUnit_Framework_TestCase
  19. {
  20. /**
  21. * @dataProvider getTestEvents
  22. */
  23. public function testEvents($eventName, array $repos)
  24. {
  25. $event = new VcsRepositoryEvent($eventName, $repos);
  26. $this->assertSame($eventName, $event->getName());
  27. $this->assertSame(array(
  28. array('type' => 'TYPE', 'url' => 'URL'),
  29. ), $event->getRepositories());
  30. }
  31. public function getTestEvents()
  32. {
  33. return array(
  34. array(AssetEvents::ADD_VCS_REPOSITORIES, array(
  35. array('type' => 'TYPE', 'url' => 'URL'),
  36. )),
  37. );
  38. }
  39. }