Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Commit

Permalink
Rename adapter resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
holyshared committed Dec 5, 2015
1 parent 351a4ff commit 40be432
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace coverallskit\spec;

use coverallskit\Environment;
use coverallskit\environment\AdaptorResolver;
use coverallskit\environment\AdapterResolver;
use coverallskit\environment\CircleCI;
use coverallskit\environment\CodeShip;
use coverallskit\environment\DroneIO;
Expand All @@ -20,7 +20,7 @@
use coverallskit\environment\TravisCI;
use coverallskit\exception\EnvironmentAdaptorNotFoundException;

describe(AdaptorResolver::class, function () {
describe(AdapterResolver::class, function () {
describe('#resolveByEnvironment', function () {
context('when supported', function () {
context('when circle-ci', function () {
Expand All @@ -31,7 +31,7 @@
'CIRCLE_BUILD_NUM' => '10',
'COVERALLS_REPO_TOKEN' => 'token'
]);
$this->resolver = new AdaptorResolver($environment);
$this->resolver = new AdapterResolver($environment);
});
it('return detect circle-ci adaptor', function () {
$adaptor = $this->resolver->resolveByEnvironment();
Expand All @@ -46,7 +46,7 @@
'DRONE_BUILD_NUMBER' => '10',
'COVERALLS_REPO_TOKEN' => 'token'
]);
$this->resolver = new AdaptorResolver($environment);
$this->resolver = new AdapterResolver($environment);
});
it('return detect drone.io adaptor', function () {
$adaptor = $this->resolver->resolveByEnvironment();
Expand All @@ -61,7 +61,7 @@
'TRAVIS_JOB_ID' => '10',
'COVERALLS_REPO_TOKEN' => 'token'
]);
$this->resolver = new AdaptorResolver($environment);
$this->resolver = new AdapterResolver($environment);
});
it('return detect travis-ci adaptor', function () {
$adaptor = $this->resolver->resolveByEnvironment();
Expand All @@ -76,7 +76,7 @@
'CI_BUILD_NUMBER' => '10',
'COVERALLS_REPO_TOKEN' => 'token'
]);
$this->resolver = new AdaptorResolver($environment);
$this->resolver = new AdapterResolver($environment);
});
it('return detect codeship adaptor', function () {
$adaptor = $this->resolver->resolveByEnvironment();
Expand All @@ -89,7 +89,7 @@
'BUILD_NUMBER' => '10',
'JENKINS_URL' => 'http://example.com'
]);
$this->resolver = new AdaptorResolver($environment);
$this->resolver = new AdapterResolver($environment);
});
it('return detect jenkins adaptor', function () {
$adaptor = $this->resolver->resolveByEnvironment();
Expand All @@ -100,7 +100,7 @@
context('when not supported', function () {
beforeEach(function () {
$environment = new Environment([]);
$this->resolver = new AdaptorResolver($environment);
$this->resolver = new AdapterResolver($environment);
});
it('return general adaptor', function () {
$adaptor = $this->resolver->resolveByEnvironment();
Expand All @@ -111,7 +111,7 @@
describe('#resolveByName', function () {
beforeEach(function () {
$environment = new Environment([]);
$this->detector = new AdaptorResolver($environment);
$this->detector = new AdapterResolver($environment);
});
context('when supported', function () {
it('return detect adaptor', function () {
Expand Down
6 changes: 3 additions & 3 deletions src/configuration/Basic.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use coverallskit\entity\CIService;
use coverallskit\entity\GitRepository;
use coverallskit\Environment;
use coverallskit\environment\AdaptorResolver;
use coverallskit\environment\AdapterResolver;
use coverallskit\ReportBuilder;
use Eloquent\Pathogen\AbsolutePath;
use Zend\Config\Config;
Expand All @@ -28,7 +28,7 @@ class Basic extends AbstractConfiguration
const REPOSITORY_DIRECTORY_KEY = 'repositoryDirectory';

/**
* @var \coverallskit\environment\AdaptorResolver
* @var \coverallskit\environment\AdapterResolver
*/
private $adaptorResolver;

Expand All @@ -38,7 +38,7 @@ class Basic extends AbstractConfiguration
*/
public function __construct(Config $config, AbsolutePath $rootPath)
{
$this->adaptorResolver = new AdaptorResolver(new Environment($_SERVER));
$this->adaptorResolver = new AdapterResolver(new Environment($_SERVER));

parent::__construct($config, $rootPath);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
use coverallskit\exception\EnvironmentAdaptorNotFoundException;

/**
* Class AdaptorResolver
* Class AdapterResolver
*/
class AdaptorResolver
class AdapterResolver
{
/**
* @var \coverallskit\environment\EnvironmentAdapter[]
Expand Down

0 comments on commit 40be432

Please sign in to comment.