コード例 #1
0
    /**
     * @dataProvider getTestEvents
     */
    public function testEvents($eventName, array $repos)
    {
        $event = new VcsRepositoryEvent($eventName, $repos);

        $this->assertSame($eventName, $event->getName());
        $this->assertSame(array(
            array('type' => 'TYPE', 'url'  => 'URL'),
        ), $event->getRepositories());
    }
コード例 #2
0
ファイル: FxpAssetPlugin.php プロジェクト: cychenyin/postmill
 /**
  * Adds vcs repositories in manager from asset dependencies with url version.
  *
  * @param VcsRepositoryEvent $event
  */
 public function onAddVcsRepositories(VcsRepositoryEvent $event)
 {
     if (null !== $this->composer) {
         $rm = $this->composer->getRepositoryManager();
         $this->addRepositories($rm, $event->getRepositories(), $this->pool);
     }
 }