Skip to content

Commit

Permalink
Merge branch 'master' into fix/default-branch-install
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksm committed Sep 24, 2021
2 parents fa8e5b0 + 8825341 commit b9fd494
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
[![Test](https://github.com/eiriksm/cosy-composer/actions/workflows/test.yml/badge.svg)](https://github.com/eiriksm/cosy-composer/actions/workflows/test.yml)
[![Coverage Status](https://coveralls.io/repos/github/eiriksm/cosy-composer/badge.svg?branch=master)](https://coveralls.io/github/eiriksm/cosy-composer?branch=master)
[![Violinist enabled](https://img.shields.io/badge/violinist-enabled-brightgreen.svg)](https://violinist.io)

Library that runs updates for Violinist
7 changes: 7 additions & 0 deletions test/GetCosyTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
use eiriksm\ArrayOutput\ArrayOutput;
use eiriksm\CosyComposer\CommandExecuter;
use eiriksm\CosyComposer\CosyComposer;
use eiriksm\CosyComposer\ProviderFactory;
use eiriksm\CosyComposer\ProviderInterface;
use GuzzleHttp\Psr7\Response;
use Http\Adapter\Guzzle6\Client;
use Violinist\ProjectData\ProjectData;
Expand Down Expand Up @@ -38,6 +40,11 @@ protected function getMockCosy($dir = null)
$client->method('sendRequest')
->willReturn($response);
$c->setHttpClient($client);
$mock_client = $this->createMock(ProviderInterface::class);
$mock_provider_factory = $this->createMock(ProviderFactory::class);
$mock_provider_factory->method('createFromHost')
->willReturn($mock_client);
$c->setProviderFactory($mock_provider_factory);
return $c;
}
}
7 changes: 6 additions & 1 deletion test/integration/DrupalRuntimeSecUpdateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
class DrupalRuntimeSecUpdateTest extends ComposerUpdateIntegrationBase
{

public function setUp()
{
parent::setUp();
$this->cosy->setHttpClient(new Client());
}

/**
* @dataProvider getDrupalUpdatesAndSec
*/
Expand Down Expand Up @@ -44,7 +50,6 @@ function ($cmd) use ($package, $version) {
'html_url' => $this->fakePrUrl,
];
});
$this->cosy->setHttpClient(new Client());
$this->runtestExpectedOutput();
$output = $this->cosy->getOutput();
self::assertEquals($sec, strpos($this->prParams["title"], '[SECURITY]') === 0);
Expand Down

0 comments on commit b9fd494

Please sign in to comment.