mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Add back abandoned key in repository search results (#10259)
This commit is contained in:
parent
d7154c2a72
commit
5b47fa1896
5 changed files with 78 additions and 3 deletions
|
@ -131,4 +131,24 @@ class ArrayRepositoryTest extends TestCase
|
|||
$repo->search('foo', 0, 'composer-plugin')
|
||||
);
|
||||
}
|
||||
|
||||
public function testSearchWithAbandonedPackages()
|
||||
{
|
||||
$repo = new ArrayRepository();
|
||||
|
||||
$package1 = $this->getPackage('foo1', '1');
|
||||
$package1->setAbandoned(true);
|
||||
$repo->addPackage($package1);
|
||||
$package2 = $this->getPackage('foo2', '1');
|
||||
$package2->setAbandoned('bar');
|
||||
$repo->addPackage($package2);
|
||||
|
||||
$this->assertSame(
|
||||
array(
|
||||
array('name' => 'foo1', 'description' => null, 'abandoned' => true),
|
||||
array('name' => 'foo2', 'description' => null, 'abandoned' => 'bar'),
|
||||
),
|
||||
$repo->search('foo')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue