From 3e63575bbb48d689076b8b8d129d6b9d165d2dc2 Mon Sep 17 00:00:00 2001 From: abluchet Date: Wed, 20 Dec 2017 09:56:20 +0100 Subject: [PATCH 1/2] Fix null title/description configuration (#1563 followup) --- .../DependencyInjection/ConfigurationTest.php | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/tests/Bridge/Symfony/Bundle/DependencyInjection/ConfigurationTest.php b/tests/Bridge/Symfony/Bundle/DependencyInjection/ConfigurationTest.php index 432f32dcfc9..9ec99706436 100644 --- a/tests/Bridge/Symfony/Bundle/DependencyInjection/ConfigurationTest.php +++ b/tests/Bridge/Symfony/Bundle/DependencyInjection/ConfigurationTest.php @@ -234,4 +234,40 @@ public function testApiKeysConfig() $this->assertTrue(isset($config['swagger']['api_keys'])); $this->assertSame($exampleConfig, $config['swagger']['api_keys'][0]); } + + /** + * Test config for empty title and description. + */ + public function testEmptyTitleDescriptionConfig() + { + $testConfig = [ + 'title' => '', + 'description' => '', + ]; + + $config = $this->processor->processConfiguration($this->configuration, [ + 'api_platform' => $testConfig, + ]); + + $this->assertSame($config['title'], ''); + $this->assertSame($config['description'], ''); + } + + /** + * Test config for null title and description. + */ + public function testNullTitleDescriptionConfig() + { + $testConfig = [ + 'title' => null, + 'description' => null, + ]; + + $config = $this->processor->processConfiguration($this->configuration, [ + 'api_platform' => $testConfig, + ]); + + $this->assertSame($config['title'], ''); + $this->assertSame($config['description'], ''); + } } From 58f081d6b717e82095a13c5eb4ad96f75f8c633e Mon Sep 17 00:00:00 2001 From: abluchet Date: Wed, 20 Dec 2017 11:11:28 +0100 Subject: [PATCH 2/2] doctrine 2.6 breaks tests --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9180b83a309..10d598686c4 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ "behat/symfony2-extension": "^2.1.1", "behatch/contexts": "dev-master", "doctrine/doctrine-bundle": "^1.6.3", - "doctrine/orm": "^2.5.2", + "doctrine/orm": ">=2.5.2 <2.5.14", "doctrine/annotations": "^1.2", "friendsofsymfony/user-bundle": "^2.0", "guzzlehttp/guzzle": "^6.0",