Skip to content

Test PHP 7.4 on Travis #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ php:
- '7.1'
- '7.2'
- '7.3'
- '7.4'

env:
global:
Expand All @@ -25,7 +26,7 @@ before_install:
- phpenv config-rm xdebug.ini || true

install:
- composer require symfony/http-kernel:$SYMFONY_VERSION symfony/config:$SYMFONY_VERSION symfony/dependency-injection:$SYMFONY_VERSION
- composer require symfony/http-kernel:$SYMFONY_VERSION symfony/config:$SYMFONY_VERSION symfony/dependency-injection:$SYMFONY_VERSION symfony/routing:$SYMFONY_VERSION
- make build
script:
- make test-technical
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@
"behat/behat": "~3.0",
"squizlabs/php_codesniffer": "3.*",
"phpunit/phpunit": "^7.0 || ^8.0",
"matthiasnoback/symfony-dependency-injection-test": "^2.0 || ^3.0",
"matthiasnoback/symfony-dependency-injection-test": "^3.0 || ^4.0",
"matthiasnoback/symfony-config-test": "^3.0 || ^4.0",
"symfony/framework-bundle": "^3.0 || ^4.0",
"symfony/routing": "^3.0 || ^4.0",
"yoanm/php-unit-extended": "~1.0"
}
}
4 changes: 2 additions & 2 deletions tests/Common/DependencyInjection/AbstractTestClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ abstract class AbstractTestClass extends AbstractExtensionTestCase
/**
* {@inheritdoc}
*/
protected function getContainerExtensions()
protected function getContainerExtensions(): array
{
return [
new JsonRpcHttpServerDocExtension()
];
}

protected function load(array $configurationValues = [], $mockResolver = true, $compile = true)
protected function loadContainer(array $configurationValues = [], $mockResolver = true, $compile = true)
{
// Inject event dispatcher
$this->setDefinition('event_dispatcher', new Definition(EventDispatcher::class));
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Creator/HttpServerDocCreatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class HttpServerDocCreatorTest extends TestCase
/** @var string|null */
private $jsonRpcEndpoint = 'my-endpoint';

protected function setUp()
protected function setUp(): void
{
$this->dispatcher = $this->prophesize(EventDispatcherInterface::class);

Expand Down
4 changes: 2 additions & 2 deletions tests/Functional/DependencyInjection/ConfigFilesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ConfigFilesTest extends AbstractTestClass
*/
public function testShouldHaveService($serviceId, $expectedClassName, $public)
{
$this->load(['endpoint' => '/endpoint'], true, false);
$this->loadContainer(['endpoint' => '/endpoint'], true, false);

$this->assertContainerBuilderHasService($serviceId, $expectedClassName);
if (true === $public) {
Expand All @@ -45,7 +45,7 @@ public function testHttpServerDocCreatorShouldHaveMethodsMappingAwareTag()
{
$serviceId = 'json_rpc_http_server_doc.creator.http_server';

$this->load();
$this->loadContainer();

// From yoanm/symfony-jsonrpc-http-server
$this->assertContainerBuilderHasServiceDefinitionWithTag(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ class JsonRpcHttpServerDocExtensionTest extends AbstractTestClass
{
public function testShouldBeLoadable()
{
$this->load();
$this->loadContainer();

$this->assertEndpointIsUsable();
}

public function testShouldManageCustomEndpointPathFromConfiguration()
{
$myCustomEndpoint = 'my-custom-endpoint';
$this->load(['endpoint' => $myCustomEndpoint]);
$this->loadContainer(['endpoint' => $myCustomEndpoint]);

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

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

$this->load();
$this->loadContainer();

// Assert custom resolver is an alias of the stub
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Endpoint/DocumentationEndpointTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class DocumentationEndpointTest extends TestCase
/** @var NormalizedDocFinder|ObjectProphecy */
private $normalizedDocFinder;

protected function setUp()
protected function setUp(): void
{
$this->normalizedDocFinder = $this->prophesize(NormalizedDocFinder::class);

Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Event/MethodDocCreatedEventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class MethodDocCreatedEventTest extends TestCase
/** @var JsonRpcMethodInterface|ObjectProphecy|null */
private $method;

protected function setUp()
protected function setUp(): void
{
$this->doc = $this->prophesize(MethodDoc::class);
$this->method = $this->prophesize(JsonRpcMethodInterface::class);
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Event/ServerDocCreatedEventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ServerDocCreatedEventTest extends TestCase
/** @var ServerDoc|ObjectProphecy */
private $doc;

protected function setUp()
protected function setUp(): void
{
$this->doc = $this->prophesize(ServerDoc::class);

Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Finder/NormalizedDocFinderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class NormalizedDocFinderTest extends TestCase
/** @var NormalizedDocFinder */
private $finder;

protected function setUp()
protected function setUp(): void
{
$this->finder = new NormalizedDocFinder();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ServerDocCreatedListenerTest extends TestCase
/** @var ServerDocCreatedListener */
private $listener;

protected function setUp()
protected function setUp(): void
{
$this->listener = new ServerDocCreatedListener();
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Provider/RawDocProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class RawDocProviderTest extends TestCase
/** @var HttpServerDocNormalizer|ObjectProphecy */
private $serverDocNormalizer;

protected function setUp()
protected function setUp(): void
{
$this->httpServerDocCreator = $this->prophesize(HttpServerDocCreator::class);
$this->serverDocNormalizer = $this->prophesize(HttpServerDocNormalizer::class);
Expand Down