Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
Using Decorator instead of DI param for test client
Browse files Browse the repository at this point in the history
  • Loading branch information
kleijnweb committed Jul 10, 2016
1 parent 3df05c6 commit 731503b
Show file tree
Hide file tree
Showing 3 changed files with 451 additions and 7 deletions.
5 changes: 0 additions & 5 deletions src/DependencyInjection/KleijnWebSwaggerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ public function load(array $configs, ContainerBuilder $container)
$publicDocsConfig = $config['document']['public'];
$arguments = [$publicDocsConfig['base_url'], $publicDocsConfig['scheme'], $publicDocsConfig['host']];
$parameterRefBuilderDefinition->setArguments($arguments);


if ($container->hasParameter('test.client.class')) {
$container->setParameter('test.client.class', 'KleijnWeb\SwaggerBundle\Test\ApiTestClient');
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Test/ApiTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static function initSchemaManager($swaggerPath)
*/
protected function setUp()
{
$this->client = static::createClient(['environment' => $this->getEnv(), 'debug' => true]);
$this->client = new ApiTestClient(static::createClient(['environment' => $this->getEnv(), 'debug' => true]));

parent::setUp();
}
Expand Down

0 comments on commit 731503b

Please sign in to comment.