1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Update baseline

This commit is contained in:
Jordi Boggiano 2022-02-04 16:50:01 +01:00
parent 3446091027
commit 4b67a97a25
No known key found for this signature in database
GPG key ID: 7BBD42C429EC80BC
2 changed files with 11 additions and 399 deletions

View file

@ -206,24 +206,21 @@ class ComposerRepositoryTest extends TestCase
'url' => 'http://example.org',
);
$result = array(
'results' => array(
array(
'name' => 'foo',
'description' => null,
),
),
$httpDownloader = $this->getHttpDownloaderMock();
$httpDownloader->expects(
[
['url' => 'http://example.org/packages.json', 'body' => JsonFile::encode(array('search' => '/search.json?q=%query%&type=%type%'))],
['url' => 'http://example.org/search.json?q=foo+bar&type=', 'body' => JsonFile::encode(array())],
],
true
);
$httpDownloader = new HttpDownloaderMock(array(
'http://example.org/packages.json' => JsonFile::encode(array('search' => '/search.json?q=%query%&type=%type%')),
'http://example.org/search.json?q=foo+bar&type=' => JsonFile::encode(array()),
));
$eventDispatcher = $this->getMockBuilder('Composer\EventDispatcher\EventDispatcher')
->disableOriginalConstructor()
->getMock();
$repository = new ComposerRepository($repoConfig, new NullIO, FactoryMock::createConfig(), $httpDownloader, $eventDispatcher);
$config = FactoryMock::createConfig();
$config->merge(['config' => ['cache-read-only' => true]]);
$repository = new ComposerRepository($repoConfig, new NullIO, $config, $httpDownloader, $eventDispatcher);
$this->assertEmpty(
$repository->search('foo bar', RepositoryInterface::SEARCH_FULLTEXT)