Skip to content

Commit 17d27d9

Browse files
Merge branch '2.8'
* 2.8: Fix merge [tests] Use @requires annotation when possible [tests] Use @requires annotation when possible [PhpUnitBridge] Add SkippedTestsListener to collect and replay skipped tests [ci] Enable collecting and replaying skipped tests [tests] Use @requires annotation when possible [Process] Workaround buggy PHP warning [FrameworkBundle] Replace PhpFileCache by FilesystemCache [FrameworkBundle] composer suggest fix [Console] Add additional ways to detect OS400 platform [Yaml] Allow tabs before comments at the end of a line Added more tests for PropertyAccess Conflicts: .travis.yml src/Symfony/Bridge/Doctrine/composer.json src/Symfony/Bridge/Monolog/composer.json src/Symfony/Bridge/ProxyManager/composer.json src/Symfony/Bridge/Swiftmailer/composer.json src/Symfony/Bridge/Twig/composer.json src/Symfony/Bundle/DebugBundle/composer.json src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php src/Symfony/Bundle/FrameworkBundle/composer.json src/Symfony/Bundle/SecurityBundle/composer.json src/Symfony/Bundle/TwigBundle/composer.json src/Symfony/Bundle/WebProfilerBundle/composer.json src/Symfony/Component/Asset/composer.json src/Symfony/Component/BrowserKit/composer.json src/Symfony/Component/ClassLoader/Tests/ApcClassLoaderTest.php src/Symfony/Component/ClassLoader/composer.json src/Symfony/Component/Config/composer.json src/Symfony/Component/Console/Tests/Helper/LegacyProgressHelperTest.php src/Symfony/Component/Console/Tests/Helper/LegacyTableHelperTest.php src/Symfony/Component/Console/composer.json src/Symfony/Component/CssSelector/composer.json src/Symfony/Component/Debug/composer.json src/Symfony/Component/DependencyInjection/composer.json src/Symfony/Component/DomCrawler/composer.json src/Symfony/Component/EventDispatcher/composer.json src/Symfony/Component/ExpressionLanguage/composer.json src/Symfony/Component/Filesystem/composer.json src/Symfony/Component/Finder/composer.json src/Symfony/Component/Form/Tests/Extension/Csrf/CsrfProvider/LegacyDefaultCsrfProviderTest.php src/Symfony/Component/Form/composer.json src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/LegacyPdoSessionHandlerTest.php src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php src/Symfony/Component/HttpFoundation/composer.json src/Symfony/Component/HttpKernel/Tests/Profiler/MongoDbProfilerStorageTest.php src/Symfony/Component/HttpKernel/Tests/Profiler/SqliteProfilerStorageTest.php src/Symfony/Component/HttpKernel/composer.json src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php src/Symfony/Component/Intl/composer.json src/Symfony/Component/Ldap/composer.json src/Symfony/Component/Locale/composer.json src/Symfony/Component/Locale/phpunit.xml.dist src/Symfony/Component/OptionsResolver/composer.json src/Symfony/Component/Process/composer.json src/Symfony/Component/PropertyAccess/composer.json src/Symfony/Component/PropertyInfo/composer.json src/Symfony/Component/Routing/composer.json src/Symfony/Component/Security/Core/composer.json src/Symfony/Component/Security/Csrf/composer.json src/Symfony/Component/Security/Guard/composer.json src/Symfony/Component/Security/Http/composer.json src/Symfony/Component/Security/composer.json src/Symfony/Component/Serializer/composer.json src/Symfony/Component/Stopwatch/composer.json src/Symfony/Component/Templating/composer.json src/Symfony/Component/Translation/composer.json src/Symfony/Component/Validator/Tests/Mapping/Cache/LegacyApcCacheTest.php src/Symfony/Component/Validator/composer.json src/Symfony/Component/VarDumper/composer.json src/Symfony/Component/Yaml/composer.json
2 parents 724ed32 + 30912ed commit 17d27d9

10 files changed

+17
-44
lines changed

Tests/DataCollectorTranslatorTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@
1717

1818
class DataCollectorTranslatorTest extends \PHPUnit_Framework_TestCase
1919
{
20-
protected function setUp()
21-
{
22-
if (!class_exists('Symfony\Component\HttpKernel\DataCollector\DataCollector')) {
23-
$this->markTestSkipped('The "DataCollector" is not available');
24-
}
25-
}
2620
public function testCollectMessages()
2721
{
2822
$collector = $this->createCollector();

Tests/Dumper/IcuResFileDumperTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@
1616

1717
class IcuResFileDumperTest extends \PHPUnit_Framework_TestCase
1818
{
19+
/**
20+
* @requires extension mbstring
21+
*/
1922
public function testFormatCatalogue()
2023
{
21-
if (!function_exists('mb_convert_encoding')) {
22-
$this->markTestSkipped('This test requires mbstring to work.');
23-
}
24-
2524
$catalogue = new MessageCatalogue('en');
2625
$catalogue->add(array('foo' => 'bar'));
2726

Tests/Loader/IcuDatFileLoaderTest.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,11 @@
1414
use Symfony\Component\Translation\Loader\IcuDatFileLoader;
1515
use Symfony\Component\Config\Resource\FileResource;
1616

17+
/**
18+
* @requires extension intl
19+
*/
1720
class IcuDatFileLoaderTest extends LocalizedTestCase
1821
{
19-
protected function setUp()
20-
{
21-
if (!extension_loaded('intl')) {
22-
$this->markTestSkipped('This test requires intl extension to work.');
23-
}
24-
}
25-
2622
/**
2723
* @expectedException \Symfony\Component\Translation\Exception\InvalidResourceException
2824
*/

Tests/Loader/IcuResFileLoaderTest.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,11 @@
1414
use Symfony\Component\Translation\Loader\IcuResFileLoader;
1515
use Symfony\Component\Config\Resource\DirectoryResource;
1616

17+
/**
18+
* @requires extension intl
19+
*/
1720
class IcuResFileLoaderTest extends LocalizedTestCase
1821
{
19-
protected function setUp()
20-
{
21-
if (!extension_loaded('intl')) {
22-
$this->markTestSkipped('This test requires intl extension to work.');
23-
}
24-
}
25-
2622
public function testLoad()
2723
{
2824
// resource is build using genrb command

Tests/Loader/JsonFileLoaderTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@
1616

1717
class JsonFileLoaderTest extends \PHPUnit_Framework_TestCase
1818
{
19-
protected function setUp()
20-
{
21-
if (!class_exists('Symfony\Component\Config\Loader\Loader')) {
22-
$this->markTestSkipped('The "Config" component is not available');
23-
}
24-
}
25-
2619
public function testLoad()
2720
{
2821
$loader = new JsonFileLoader();

Tests/Loader/LocalizedTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ abstract class LocalizedTestCase extends \PHPUnit_Framework_TestCase
1616
protected function setUp()
1717
{
1818
if (!extension_loaded('intl')) {
19-
$this->markTestSkipped('The "intl" extension is not available');
19+
$this->markTestSkipped('Extension intl is required.');
2020
}
2121
}
2222
}

Tests/Loader/XliffFileLoaderTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,11 @@ public function testIncompleteResource()
5959
$this->assertEquals(array('foo' => 'bar', 'extra' => 'extra', 'key' => '', 'test' => 'with'), $catalogue->all('domain1'));
6060
}
6161

62+
/**
63+
* @requires extension mbstring
64+
*/
6265
public function testEncoding()
6366
{
64-
if (!function_exists('iconv') && !function_exists('mb_convert_encoding')) {
65-
$this->markTestSkipped('The iconv and mbstring extensions are not available.');
66-
}
67-
6867
$loader = new XliffFileLoader();
6968
$catalogue = $loader->load(__DIR__.'/../fixtures/encoding.xlf', 'en', 'domain1');
7069

Tests/LoggingTranslatorTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@
1717

1818
class LoggingTranslatorTest extends \PHPUnit_Framework_TestCase
1919
{
20-
protected function setUp()
21-
{
22-
if (!interface_exists('Psr\Log\LoggerInterface')) {
23-
$this->markTestSkipped('The "LoggerInterface" is not available');
24-
}
25-
}
26-
2720
public function testTransWithNoTranslationIsLogged()
2821
{
2922
$logger = $this->getMock('Psr\Log\LoggerInterface');

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"php": ">=5.5.9"
2020
},
2121
"require-dev": {
22-
"symfony/phpunit-bridge": "~2.8|~3.0",
2322
"symfony/config": "~2.8|~3.0",
2423
"symfony/intl": "~2.8|~3.0",
2524
"symfony/yaml": "~2.8|~3.0",

phpunit.xml.dist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,8 @@
2525
</exclude>
2626
</whitelist>
2727
</filter>
28+
29+
<listeners>
30+
<listener class="Symfony\Bridge\PhpUnit\SkippedTestsListener" />
31+
</listeners>
2832
</phpunit>

0 commit comments

Comments
 (0)