Пример #1
0
 /**
  * @dataProvider supportProvider
  */
 public function testSupport($url, $assertion)
 {
     if ($assertion === true) {
         $this->assertTrue(SvnDriver::supports($this->getMock('Composer\\IO\\IOInterface'), $url));
     } else {
         $this->assertFalse(SvnDriver::supports($this->getMock('Composer\\IO\\IOInterface'), $url));
     }
 }
Пример #2
0
    /**
     * {@inheritDoc}
     */
    public static function supports(IOInterface $io, Config $config, $url, $deep = false)
    {
        if (0 === strpos($url, 'http') && preg_match('/\/svn|svn\//i', $url)) {
            $url = 'svn' . substr($url, strpos($url, '://'));
        }

        return parent::supports($io, $config, $url, $deep);
    }
Пример #3
0
 /**
  * @dataProvider supportProvider
  */
 public function testSupport($url, $assertion)
 {
     $config = new Config();
     $result = SvnDriver::supports($this->getMock('Composer\\IO\\IOInterface'), $config, $url);
     $this->assertEquals($assertion, $result);
 }