Skip to content

Commit a3a6fe0

Browse files
authoredJan 12, 2020
Test PHP 7.4 on Travis (#14)
1 parent 7a59862 commit a3a6fe0

12 files changed

+18
-16
lines changed
 

‎.travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ php:
44
- '7.1'
55
- '7.2'
66
- '7.3'
7+
- '7.4'
78

89
env:
910
global:
@@ -25,7 +26,7 @@ before_install:
2526
- phpenv config-rm xdebug.ini || true
2627

2728
install:
28-
- composer require symfony/http-kernel:$SYMFONY_VERSION symfony/config:$SYMFONY_VERSION symfony/dependency-injection:$SYMFONY_VERSION
29+
- composer require symfony/http-kernel:$SYMFONY_VERSION symfony/config:$SYMFONY_VERSION symfony/dependency-injection:$SYMFONY_VERSION symfony/routing:$SYMFONY_VERSION
2930
- make build
3031
script:
3132
- make test-technical

‎composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@
4444
"behat/behat": "~3.0",
4545
"squizlabs/php_codesniffer": "3.*",
4646
"phpunit/phpunit": "^7.0 || ^8.0",
47-
"matthiasnoback/symfony-dependency-injection-test": "^2.0 || ^3.0",
47+
"matthiasnoback/symfony-dependency-injection-test": "^3.0 || ^4.0",
4848
"matthiasnoback/symfony-config-test": "^3.0 || ^4.0",
4949
"symfony/framework-bundle": "^3.0 || ^4.0",
50+
"symfony/routing": "^3.0 || ^4.0",
5051
"yoanm/php-unit-extended": "~1.0"
5152
}
5253
}

‎tests/Common/DependencyInjection/AbstractTestClass.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ abstract class AbstractTestClass extends AbstractExtensionTestCase
2323
/**
2424
* {@inheritdoc}
2525
*/
26-
protected function getContainerExtensions()
26+
protected function getContainerExtensions(): array
2727
{
2828
return [
2929
new JsonRpcHttpServerDocExtension()
3030
];
3131
}
3232

33-
protected function load(array $configurationValues = [], $mockResolver = true, $compile = true)
33+
protected function loadContainer(array $configurationValues = [], $mockResolver = true, $compile = true)
3434
{
3535
// Inject event dispatcher
3636
$this->setDefinition('event_dispatcher', new Definition(EventDispatcher::class));

‎tests/Functional/Creator/HttpServerDocCreatorTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class HttpServerDocCreatorTest extends TestCase
2424
/** @var string|null */
2525
private $jsonRpcEndpoint = 'my-endpoint';
2626

27-
protected function setUp()
27+
protected function setUp(): void
2828
{
2929
$this->dispatcher = $this->prophesize(EventDispatcherInterface::class);
3030

‎tests/Functional/DependencyInjection/ConfigFilesTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class ConfigFilesTest extends AbstractTestClass
3232
*/
3333
public function testShouldHaveService($serviceId, $expectedClassName, $public)
3434
{
35-
$this->load(['endpoint' => '/endpoint'], true, false);
35+
$this->loadContainer(['endpoint' => '/endpoint'], true, false);
3636

3737
$this->assertContainerBuilderHasService($serviceId, $expectedClassName);
3838
if (true === $public) {
@@ -45,7 +45,7 @@ public function testHttpServerDocCreatorShouldHaveMethodsMappingAwareTag()
4545
{
4646
$serviceId = 'json_rpc_http_server_doc.creator.http_server';
4747

48-
$this->load();
48+
$this->loadContainer();
4949

5050
// From yoanm/symfony-jsonrpc-http-server
5151
$this->assertContainerBuilderHasServiceDefinitionWithTag(

‎tests/Functional/DependencyInjection/JsonRpcHttpServerDocExtensionTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ class JsonRpcHttpServerDocExtensionTest extends AbstractTestClass
1414
{
1515
public function testShouldBeLoadable()
1616
{
17-
$this->load();
17+
$this->loadContainer();
1818

1919
$this->assertEndpointIsUsable();
2020
}
2121

2222
public function testShouldManageCustomEndpointPathFromConfiguration()
2323
{
2424
$myCustomEndpoint = 'my-custom-endpoint';
25-
$this->load(['endpoint' => $myCustomEndpoint]);
25+
$this->loadContainer(['endpoint' => $myCustomEndpoint]);
2626

2727
// Assert custom resolver is an alias of the stub
2828
$this->assertContainerBuilderHasParameter(self::EXPECTED_HTTP_ENDPOINT_PATH_CONTAINER_PARAM, $myCustomEndpoint);
@@ -43,7 +43,7 @@ public function testShouldBindDocProviderToNormalizedDocFinder()
4343

4444
$this->setDefinition($docProviderServiceId, $docProviderServiceDefinition);
4545

46-
$this->load();
46+
$this->loadContainer();
4747

4848
// Assert custom resolver is an alias of the stub
4949
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(

‎tests/Functional/Endpoint/DocumentationEndpointTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class DocumentationEndpointTest extends TestCase
2020
/** @var NormalizedDocFinder|ObjectProphecy */
2121
private $normalizedDocFinder;
2222

23-
protected function setUp()
23+
protected function setUp(): void
2424
{
2525
$this->normalizedDocFinder = $this->prophesize(NormalizedDocFinder::class);
2626

‎tests/Functional/Event/MethodDocCreatedEventTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class MethodDocCreatedEventTest extends TestCase
2020
/** @var JsonRpcMethodInterface|ObjectProphecy|null */
2121
private $method;
2222

23-
protected function setUp()
23+
protected function setUp(): void
2424
{
2525
$this->doc = $this->prophesize(MethodDoc::class);
2626
$this->method = $this->prophesize(JsonRpcMethodInterface::class);

‎tests/Functional/Event/ServerDocCreatedEventTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ServerDocCreatedEventTest extends TestCase
1717
/** @var ServerDoc|ObjectProphecy */
1818
private $doc;
1919

20-
protected function setUp()
20+
protected function setUp(): void
2121
{
2222
$this->doc = $this->prophesize(ServerDoc::class);
2323

‎tests/Functional/Finder/NormalizedDocFinderTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class NormalizedDocFinderTest extends TestCase
1414
/** @var NormalizedDocFinder */
1515
private $finder;
1616

17-
protected function setUp()
17+
protected function setUp(): void
1818
{
1919
$this->finder = new NormalizedDocFinder();
2020
}

‎tests/Functional/Listener/ServerDocCreatedListenerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ServerDocCreatedListenerTest extends TestCase
2323
/** @var ServerDocCreatedListener */
2424
private $listener;
2525

26-
protected function setUp()
26+
protected function setUp(): void
2727
{
2828
$this->listener = new ServerDocCreatedListener();
2929
}

‎tests/Functional/Provider/RawDocProviderTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class RawDocProviderTest extends TestCase
2121
/** @var HttpServerDocNormalizer|ObjectProphecy */
2222
private $serverDocNormalizer;
2323

24-
protected function setUp()
24+
protected function setUp(): void
2525
{
2626
$this->httpServerDocCreator = $this->prophesize(HttpServerDocCreator::class);
2727
$this->serverDocNormalizer = $this->prophesize(HttpServerDocNormalizer::class);

0 commit comments

Comments
 (0)
Please sign in to comment.