Skip to content

Commit

Permalink
add test on mix case
Browse files Browse the repository at this point in the history
  • Loading branch information
Mips2648 committed Oct 27, 2024
1 parent 26845c9 commit a0650ff
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/MipsEqLogicTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,20 @@ public function testgetInstalledPackageDetail_present() {
$this->assertEquals('1.1.0', $details[1]);
}

// tests on getInstalledPackageDetail
public function testgetInstalledPackageDetail_present_mix_case() {
$trait = new class {
use MipsEqLogicTrait {
getInstalledPackageDetail as public; // make the method public
}
};

$result = $trait->getInstalledPackageDetail('unidecode', 'Unidecode==1.1.0||anotherpackage==1.1.1', $details);
$this->assertTrue($result);
$this->assertEquals('Unidecode==1.1.0', $details[0]);
$this->assertEquals('1.1.0', $details[1]);
}

public function testgetInstalledPackageDetail_absent() {
$trait = new class {
use MipsEqLogicTrait {
Expand Down

0 comments on commit a0650ff

Please sign in to comment.