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

Commit

Permalink
fix variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
holyshared committed Dec 5, 2015
1 parent 929f41d commit 3cfe852
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 35 deletions.
4 changes: 2 additions & 2 deletions spec/CoverallsReportTransfer.spec.php
Expand Up @@ -43,8 +43,8 @@
'TRAVIS_JOB_ID' => '10',
'COVERALLS_REPO_TOKEN' => 'token'
]);
$adaptor = new TravisCI($environment);
$service = new CIService($adaptor);
$adapter = new TravisCI($environment);
$service = new CIService($adapter);

$this->report = new CoverallsReport([
'name' => __DIR__ . '/fixtures/coveralls.json',
Expand Down
12 changes: 6 additions & 6 deletions spec/entity/CIService.spec.php
Expand Up @@ -19,13 +19,13 @@
beforeEach(function () {
$this->prophet = new Prophet();

$adaptor = $this->prophet->prophesize(EnvironmentAdapter::class);
$adaptor->getName()->willReturn('travis-ci');
$adaptor->getBuildJobId()->willReturn('10');
$adaptor->getCoverallsToken()->willReturn('token');
$adaptor->isSupported()->willReturn(true);
$adapter = $this->prophet->prophesize(EnvironmentAdapter::class);
$adapter->getName()->willReturn('travis-ci');
$adapter->getBuildJobId()->willReturn('10');
$adapter->getCoverallsToken()->willReturn('token');
$adapter->isSupported()->willReturn(true);

$this->service = new CIService($adaptor->reveal());
$this->service = new CIService($adapter->reveal());
});
describe('getServiceName', function () {
it('return service name', function () {
Expand Down
42 changes: 21 additions & 21 deletions spec/environment/AdapterResolver.spec.php
Expand Up @@ -33,9 +33,9 @@
]);
$this->resolver = new AdapterResolver($environment);
});
it('return detect circle-ci adaptor', function () {
$adaptor = $this->resolver->resolveByEnvironment();
expect($adaptor)->toBeAnInstanceOf(CircleCI::class);
it('return detect circle-ci adapter', function () {
$adapter = $this->resolver->resolveByEnvironment();
expect($adapter)->toBeAnInstanceOf(CircleCI::class);
});
});
context('when drone.io', function () {
Expand All @@ -48,9 +48,9 @@
]);
$this->resolver = new AdapterResolver($environment);
});
it('return detect drone.io adaptor', function () {
$adaptor = $this->resolver->resolveByEnvironment();
expect($adaptor)->toBeAnInstanceOf(DroneIO::class);
it('return detect drone.io adapter', function () {
$adapter = $this->resolver->resolveByEnvironment();
expect($adapter)->toBeAnInstanceOf(DroneIO::class);
});
});
context('when travis-ci', function () {
Expand All @@ -63,9 +63,9 @@
]);
$this->resolver = new AdapterResolver($environment);
});
it('return detect travis-ci adaptor', function () {
$adaptor = $this->resolver->resolveByEnvironment();
expect($adaptor)->toBeAnInstanceOf(TravisCI::class);
it('return detect travis-ci adapter', function () {
$adapter = $this->resolver->resolveByEnvironment();
expect($adapter)->toBeAnInstanceOf(TravisCI::class);
});
});
context('when codeship', function () {
Expand All @@ -78,9 +78,9 @@
]);
$this->resolver = new AdapterResolver($environment);
});
it('return detect codeship adaptor', function () {
$adaptor = $this->resolver->resolveByEnvironment();
expect($adaptor)->toBeAnInstanceOf(CodeShip::class);
it('return detect codeship adapter', function () {
$adapter = $this->resolver->resolveByEnvironment();
expect($adapter)->toBeAnInstanceOf(CodeShip::class);
});
});
context('when jenkins', function () {
Expand All @@ -91,9 +91,9 @@
]);
$this->resolver = new AdapterResolver($environment);
});
it('return detect jenkins adaptor', function () {
$adaptor = $this->resolver->resolveByEnvironment();
expect($adaptor)->toBeAnInstanceOf(Jenkins::class);
it('return detect jenkins adapter', function () {
$adapter = $this->resolver->resolveByEnvironment();
expect($adapter)->toBeAnInstanceOf(Jenkins::class);
});
});
});
Expand All @@ -102,9 +102,9 @@
$environment = new Environment([]);
$this->resolver = new AdapterResolver($environment);
});
it('return general adaptor', function () {
$adaptor = $this->resolver->resolveByEnvironment();
expect($adaptor)->toBeAnInstanceOf(General::class);
it('return general adapter', function () {
$adapter = $this->resolver->resolveByEnvironment();
expect($adapter)->toBeAnInstanceOf(General::class);
});
});
});
Expand All @@ -114,9 +114,9 @@
$this->detector = new AdapterResolver($environment);
});
context('when supported', function () {
it('return detect adaptor', function () {
$adaptor = $this->resolver->resolveByName('circle-ci');
expect($adaptor)->toBeAnInstanceOf(CircleCI::class);
it('return detect adapter', function () {
$adapter = $this->resolver->resolveByName('circle-ci');
expect($adapter)->toBeAnInstanceOf(CircleCI::class);
});
});
context('when not supported', function () {
Expand Down
2 changes: 1 addition & 1 deletion spec/environment/CircleCI.spec.php
Expand Up @@ -15,7 +15,7 @@

describe(CircleCI::class, function () {
describe('#getName', function () {
it('return adaptor name', function () {
it('return adapter name', function () {
$this->circleCI = new CircleCI(new Environment());
expect($this->circleCI->getName())->toBe('circle-ci');
});
Expand Down
2 changes: 1 addition & 1 deletion spec/environment/CodeShip.spec.php
Expand Up @@ -15,7 +15,7 @@

describe(CodeShip::class, function () {
describe('#getName', function () {
it('return adaptor name', function () {
it('return adapter name', function () {
$this->codeship = new CodeShip(new Environment());
expect($this->codeship->getName())->toBe('codeship');
});
Expand Down
2 changes: 1 addition & 1 deletion spec/environment/DroneIO.spec.php
Expand Up @@ -15,7 +15,7 @@

describe(DroneIO::class, function () {
describe('#getName', function () {
it('return adaptor name', function () {
it('return adapter name', function () {
$this->drone = new DroneIO(new Environment());
expect($this->drone->getName())->toBe('drone.io');
});
Expand Down
2 changes: 1 addition & 1 deletion spec/environment/General.spec.php
Expand Up @@ -15,7 +15,7 @@

describe(General::class, function () {
describe('#getName', function () {
it('return adaptor name', function () {
it('return adapter name', function () {
$this->general = new General(new Environment());
expect($this->general->getName())->toBe('');
});
Expand Down
2 changes: 1 addition & 1 deletion spec/environment/Jenkins.spec.php
Expand Up @@ -15,7 +15,7 @@

describe(Jenkins::class, function () {
describe('#getName', function () {
it('return adaptor name', function () {
it('return adapter name', function () {
$this->jenkins = new Jenkins(new Environment());
expect($this->jenkins->getName())->toBe('jenkins');
});
Expand Down
2 changes: 1 addition & 1 deletion spec/environment/TravisCI.spec.php
Expand Up @@ -15,7 +15,7 @@

describe(TravisCI::class, function () {
describe('#getName', function () {
it('return adaptor name', function () {
it('return adapter name', function () {
$this->travis = new TravisCI(new Environment());
expect($this->travis->getName())->toBe('travis-ci');
});
Expand Down

0 comments on commit 3cfe852

Please sign in to comment.