Skip to content

Commit c54caca

Browse files
committed
Check highest and lowest dependencies
1 parent cb8469c commit c54caca

File tree

3 files changed

+47
-6
lines changed

3 files changed

+47
-6
lines changed

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ php:
77
- hhvm
88

99
env:
10-
- AWS_BUNDLE_FORMAT_UNDER_TEST="yml"
11-
- AWS_BUNDLE_FORMAT_UNDER_TEST="php"
12-
- AWS_BUNDLE_FORMAT_UNDER_TEST="xml"
10+
- COMPOSER_OPTS=""
11+
- COMPOSER_OPTS="--prefer-lowest"
1312

1413
sudo: false
1514

1615
install: travis_retry composer install --no-interaction --prefer-source
1716

18-
script: vendor/bin/phpunit
17+
script: vendor/bin/phpunit

tests/DependencyInjection/AwsExtensionTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ class AwsExtensionTest extends \PHPUnit_Framework_TestCase
1919

2020
public function setUp()
2121
{
22-
$format = getenv('AWS_BUNDLE_FORMAT_UNDER_TEST') ?: 'yml';
23-
$kernel = new AppKernel('test', true, $format);
22+
$kernel = new AppKernel('test', true);
2423
$kernel->boot();
2524

2625
$this->container = $kernel->getContainer();
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
namespace Aws\Symfony\DependencyInjection;
3+
4+
5+
use AppKernel;
6+
use Symfony\Component\Filesystem\Filesystem;
7+
8+
class ConfigurationTest extends \PHPUnit_Framework_TestCase
9+
{
10+
public function setUp()
11+
{
12+
(new Filesystem)
13+
->remove(implode(DIRECTORY_SEPARATOR, [
14+
dirname(__DIR__),
15+
'fixtures',
16+
'cache',
17+
'test',
18+
]));
19+
}
20+
21+
/**
22+
* @test
23+
* @dataProvider formatProvider
24+
*
25+
* @param string $format
26+
*/
27+
public function container_should_compile_and_load($format)
28+
{
29+
$kernel = new AppKernel('test', true, $format);
30+
$kernel->boot();
31+
32+
$this->assertTrue($kernel->getContainer()->has('aws_sdk'));
33+
}
34+
35+
public function formatProvider()
36+
{
37+
return [
38+
['yml'],
39+
['php'],
40+
['xml'],
41+
];
42+
}
43+
}

0 commit comments

Comments
 (0)