Skip to content

Commit 07d206f

Browse files
committed
Do not add fixtures for non relevant Json & Xml descriptors
1 parent 0cc09cf commit 07d206f

File tree

8 files changed

+37
-485
lines changed

8 files changed

+37
-485
lines changed

src/Symfony/Component/Console/Tests/Descriptor/AbstractDescriptorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ abstract protected function getDescriptor();
8686

8787
abstract protected function getFormat();
8888

89-
private function getDescriptionTestData(array $objects)
89+
protected function getDescriptionTestData(array $objects)
9090
{
9191
$data = array();
9292
foreach ($objects as $name => $object) {

src/Symfony/Component/Console/Tests/Descriptor/MarkdownDescriptorTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,27 @@
1212
namespace Symfony\Component\Console\Tests\Descriptor;
1313

1414
use Symfony\Component\Console\Descriptor\MarkdownDescriptor;
15+
use Symfony\Component\Console\Tests\Fixtures\DescriptorApplicationMbString;
16+
use Symfony\Component\Console\Tests\Fixtures\DescriptorCommandMbString;
1517

1618
class MarkdownDescriptorTest extends AbstractDescriptorTest
1719
{
20+
public function getDescribeCommandTestData()
21+
{
22+
return $this->getDescriptionTestData(array_merge(
23+
ObjectsProvider::getCommands(),
24+
array('command_mbstring' => new DescriptorCommandMbString())
25+
));
26+
}
27+
28+
public function getDescribeApplicationTestData()
29+
{
30+
return $this->getDescriptionTestData(array_merge(
31+
ObjectsProvider::getApplications(),
32+
array('application_mbstring' => new DescriptorApplicationMbString())
33+
));
34+
}
35+
1836
protected function getDescriptor()
1937
{
2038
return new MarkdownDescriptor();

src/Symfony/Component/Console/Tests/Descriptor/ObjectsProvider.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@
1616
use Symfony\Component\Console\Input\InputOption;
1717
use Symfony\Component\Console\Tests\Fixtures\DescriptorApplication1;
1818
use Symfony\Component\Console\Tests\Fixtures\DescriptorApplication2;
19-
use Symfony\Component\Console\Tests\Fixtures\DescriptorApplicationMbString;
2019
use Symfony\Component\Console\Tests\Fixtures\DescriptorCommand1;
2120
use Symfony\Component\Console\Tests\Fixtures\DescriptorCommand2;
22-
use Symfony\Component\Console\Tests\Fixtures\DescriptorCommandMbString;
2321

2422
/**
2523
* @author Jean-François Simon <contact@jfsimon.fr>
@@ -66,7 +64,6 @@ public static function getCommands()
6664
return array(
6765
'command_1' => new DescriptorCommand1(),
6866
'command_2' => new DescriptorCommand2(),
69-
'command_mbstring' => new DescriptorCommandMbString(),
7067
);
7168
}
7269

@@ -75,7 +72,6 @@ public static function getApplications()
7572
return array(
7673
'application_1' => new DescriptorApplication1(),
7774
'application_2' => new DescriptorApplication2(),
78-
'application_mbstring' => new DescriptorApplicationMbString(),
7975
);
8076
}
8177
}

src/Symfony/Component/Console/Tests/Descriptor/TextDescriptorTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,27 @@
1212
namespace Symfony\Component\Console\Tests\Descriptor;
1313

1414
use Symfony\Component\Console\Descriptor\TextDescriptor;
15+
use Symfony\Component\Console\Tests\Fixtures\DescriptorApplicationMbString;
16+
use Symfony\Component\Console\Tests\Fixtures\DescriptorCommandMbString;
1517

1618
class TextDescriptorTest extends AbstractDescriptorTest
1719
{
20+
public function getDescribeCommandTestData()
21+
{
22+
return $this->getDescriptionTestData(array_merge(
23+
ObjectsProvider::getCommands(),
24+
array('command_mbstring' => new DescriptorCommandMbString())
25+
));
26+
}
27+
28+
public function getDescribeApplicationTestData()
29+
{
30+
return $this->getDescriptionTestData(array_merge(
31+
ObjectsProvider::getApplications(),
32+
array('application_mbstring' => new DescriptorApplicationMbString())
33+
));
34+
}
35+
1836
protected function getDescriptor()
1937
{
2038
return new TextDescriptor();

src/Symfony/Component/Console/Tests/Fixtures/application_mbstring.json

Lines changed: 0 additions & 273 deletions
This file was deleted.

0 commit comments

Comments
 (0)