@ -108,7 +108,8 @@ class ZipDownloaderTest extends TestCase
public function testZipArchiveOnlyFailed()
{
$this->setExpectedException('RuntimeException', 'There was an error extracting the ZIP file');
self::expectException('RuntimeException');
self::expectExceptionMessage('There was an error extracting the ZIP file');
if (!class_exists('ZipArchive')) {
$this->markTestSkipped('zip extension missing');
}
@ -130,7 +131,8 @@ class ZipDownloaderTest extends TestCase
public function testZipArchiveExtractOnlyFailed()
{
$this->setExpectedException('RuntimeException', 'The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems): Not a directory');
self::expectException('RuntimeException');
self::expectExceptionMessage('The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems): Not a directory');
if (!class_exists('ZipArchive')) {
$this->markTestSkipped('zip extension missing');
}
@ -173,7 +175,8 @@ class ZipDownloaderTest extends TestCase
public function testSystemUnzipOnlyFailed()
{
$this->setExpectedException('Exception', 'Failed to extract : (1) unzip');
self::expectException('Exception');
self::expectExceptionMessage('Failed to extract : (1) unzip');
@ -81,10 +81,8 @@ class GitBitbucketDriverTest extends TestCase
public function testGetRootIdentifierWrongScmType()
{
$this->setExpectedException(
'\RuntimeException',
'https://bitbucket.org/user/repo.git does not appear to be a git repository, use https://bitbucket.org/user/repo but remember that Bitbucket no longer supports the mercurial repositories. https://bitbucket.org/blog/sunsetting-mercurial-support-in-bitbucket'
);
self::expectException('RuntimeException');
self::expectExceptionMessage('https://bitbucket.org/user/repo.git does not appear to be a git repository, use https://bitbucket.org/user/repo but remember that Bitbucket no longer supports the mercurial repositories. https://bitbucket.org/blog/sunsetting-mercurial-support-in-bitbucket');
@ -49,7 +49,8 @@ class SvnDriverTest extends TestCase
public function testWrongCredentialsInUrl()
{
$this->setExpectedException('RuntimeException', "Repository https://till:secret@corp.svn.local/repo could not be processed, wrong credentials provided (svn: OPTIONS of 'https://corp.svn.local/repo': authorization failed: Could not authenticate to server: rejected Basic challenge (https://corp.svn.local/))");
self::expectException('RuntimeException');
self::expectExceptionMessage("Repository https://till:secret@corp.svn.local/repo could not be processed, wrong credentials provided (svn: OPTIONS of 'https://corp.svn.local/repo': authorization failed: Could not authenticate to server: rejected Basic challenge (https://corp.svn.local/))");
$this->markTestSkipped('The PHP zip extension is not loaded.');
}
$this->setExpectedException('\RuntimeException', 'Archive has more than one top level directories, and no composer.json was found on the top level, so it\'s an invalid archive. Top level paths found were: folder1/,folder2/');
self::expectException('RuntimeException');
self::expectExceptionMessage('Archive has more than one top level directories, and no composer.json was found on the top level, so it\'s an invalid archive. Top level paths found were: folder1/,folder2/');