mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Update baseline
This commit is contained in:
parent
3446091027
commit
4b67a97a25
2 changed files with 11 additions and 399 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue