Skip to content

Commit 0628b01

Browse files
committed
merged branch fabpot/tests-simplification (PR #8796)
This PR was merged into the master branch. Discussion ---------- removed deps checks in unit tests | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a As Composer is now widely used in the PHP world, having to run composer install before running the test suite is expected. This also has the nice benefit of removing a bunch of code, making things easier to maintain (there is only one place to declare a dev dependency), and probably more. see fabpot/Silex#626 where we did the same a while ago for Silex. Commits ------- de50621 removed deps checks in unit tests
2 parents eb90d01 + a37160a commit 0628b01

File tree

4 files changed

+0
-39
lines changed

4 files changed

+0
-39
lines changed

Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,6 @@ public function testValidation()
234234

235235
public function testAnnotations()
236236
{
237-
if (!class_exists('Doctrine\\Common\\Version')) {
238-
$this->markTestSkipped('Doctrine is not available.');
239-
}
240-
241237
$container = $this->createContainerFromFile('full');
242238

243239
$this->assertEquals($container->getParameter('kernel.cache_dir').'/annotations', $container->getDefinition('annotations.file_cache_reader')->getArgument(1));

Tests/Functional/WebTestCase.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,6 @@ public static function assertRedirect($response, $location)
2323
self::assertEquals('http://localhost'.$location, $response->headers->get('Location'));
2424
}
2525

26-
protected function setUp()
27-
{
28-
if (!class_exists('Twig_Environment')) {
29-
$this->markTestSkipped('Twig is not available.');
30-
}
31-
32-
parent::setUp();
33-
}
34-
3526
protected function deleteTmpDir($testCase)
3627
{
3728
if (!file_exists($dir = sys_get_temp_dir().'/'.Kernel::VERSION.'/'.$testCase)) {

Tests/Templating/Helper/FormHelperDivLayoutTest.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,6 @@ class FormHelperDivLayoutTest extends AbstractDivLayoutTest
2929
*/
3030
protected $engine;
3131

32-
protected function setUp()
33-
{
34-
if (!class_exists('Symfony\Bundle\FrameworkBundle\Templating\Helper\TranslatorHelper')) {
35-
$this->markTestSkipped('The "FrameworkBundle" is not available');
36-
}
37-
38-
if (!class_exists('Symfony\Component\Templating\PhpEngine')) {
39-
$this->markTestSkipped('The "Templating" component is not available');
40-
}
41-
42-
parent::setUp();
43-
}
44-
4532
protected function getExtensions()
4633
{
4734
// should be moved to the Form component once absolute file paths are supported

Tests/Templating/Helper/FormHelperTableLayoutTest.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,6 @@ class FormHelperTableLayoutTest extends AbstractTableLayoutTest
2929
*/
3030
protected $engine;
3131

32-
protected function setUp()
33-
{
34-
if (!class_exists('Symfony\Bundle\FrameworkBundle\Templating\Helper\TranslatorHelper')) {
35-
$this->markTestSkipped('The "FrameworkBundle" is not available');
36-
}
37-
38-
if (!class_exists('Symfony\Component\Templating\PhpEngine')) {
39-
$this->markTestSkipped('The "Templating" component is not available');
40-
}
41-
42-
parent::setUp();
43-
}
44-
4532
protected function getExtensions()
4633
{
4734
// should be moved to the Form component once absolute file paths are supported

0 commit comments

Comments
 (0)