1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 08:32:56 +00:00

Refactoring Tests (#6849)

This commit is contained in:
Gabriel Caruso 2017-11-30 12:58:10 -02:00 committed by Jordi Boggiano
parent ecb26c7b75
commit a4b220273e
9 changed files with 24 additions and 27 deletions

View file

@ -76,7 +76,7 @@ class SolverTest extends TestCase
$this->fail('Unsolvable conflict did not result in exception.');
} catch (SolverProblemsException $e) {
$problems = $e->getProblems();
$this->assertEquals(1, count($problems));
$this->assertCount(1, $problems);
$this->assertEquals(2, $e->getCode());
$this->assertEquals("\n - The requested package b could not be found in any version, there may be a typo in the package name.", $problems[0]->getPrettyString());
}
@ -671,7 +671,7 @@ class SolverTest extends TestCase
$this->fail('Unsolvable conflict did not result in exception.');
} catch (SolverProblemsException $e) {
$problems = $e->getProblems();
$this->assertEquals(1, count($problems));
$this->assertCount(1, $problems);
$msg = "\n";
$msg .= " Problem 1\n";
@ -700,7 +700,7 @@ class SolverTest extends TestCase
$this->fail('Unsolvable conflict did not result in exception.');
} catch (SolverProblemsException $e) {
$problems = $e->getProblems();
$this->assertEquals(1, count($problems));
$this->assertCount(1, $problems);
// TODO assert problem properties
$msg = "\n";
@ -747,7 +747,7 @@ class SolverTest extends TestCase
$this->fail('Unsolvable conflict did not result in exception.');
} catch (SolverProblemsException $e) {
$problems = $e->getProblems();
$this->assertEquals(1, count($problems));
$this->assertCount(1, $problems);
$msg = "\n";
$msg .= " Problem 1\n";