Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Console] Descriptors should use Helper::strlen #20900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Do not add fixtures for non relevant Json & Xml descriptors
  • Loading branch information
ogizanagi committed Dec 13, 2016
commit 07d206f22cc6cc41f58e9f61d649ce2ffa12092d
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ abstract protected function getDescriptor();

abstract protected function getFormat();

private function getDescriptionTestData(array $objects)
protected function getDescriptionTestData(array $objects)
{
$data = array();
foreach ($objects as $name => $object) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,27 @@
namespace Symfony\Component\Console\Tests\Descriptor;

use Symfony\Component\Console\Descriptor\MarkdownDescriptor;
use Symfony\Component\Console\Tests\Fixtures\DescriptorApplicationMbString;
use Symfony\Component\Console\Tests\Fixtures\DescriptorCommandMbString;

class MarkdownDescriptorTest extends AbstractDescriptorTest
{
public function getDescribeCommandTestData()
{
return $this->getDescriptionTestData(array_merge(
ObjectsProvider::getCommands(),
array('command_mbstring' => new DescriptorCommandMbString())
));
}

public function getDescribeApplicationTestData()
{
return $this->getDescriptionTestData(array_merge(
ObjectsProvider::getApplications(),
array('application_mbstring' => new DescriptorApplicationMbString())
));
}

protected function getDescriptor()
{
return new MarkdownDescriptor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Tests\Fixtures\DescriptorApplication1;
use Symfony\Component\Console\Tests\Fixtures\DescriptorApplication2;
use Symfony\Component\Console\Tests\Fixtures\DescriptorApplicationMbString;
use Symfony\Component\Console\Tests\Fixtures\DescriptorCommand1;
use Symfony\Component\Console\Tests\Fixtures\DescriptorCommand2;
use Symfony\Component\Console\Tests\Fixtures\DescriptorCommandMbString;

/**
* @author Jean-François Simon <contact@jfsimon.fr>
Expand Down Expand Up @@ -66,7 +64,6 @@ public static function getCommands()
return array(
'command_1' => new DescriptorCommand1(),
'command_2' => new DescriptorCommand2(),
'command_mbstring' => new DescriptorCommandMbString(),
);
}

Expand All @@ -75,7 +72,6 @@ public static function getApplications()
return array(
'application_1' => new DescriptorApplication1(),
'application_2' => new DescriptorApplication2(),
'application_mbstring' => new DescriptorApplicationMbString(),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,27 @@
namespace Symfony\Component\Console\Tests\Descriptor;

use Symfony\Component\Console\Descriptor\TextDescriptor;
use Symfony\Component\Console\Tests\Fixtures\DescriptorApplicationMbString;
use Symfony\Component\Console\Tests\Fixtures\DescriptorCommandMbString;

class TextDescriptorTest extends AbstractDescriptorTest
{
public function getDescribeCommandTestData()
{
return $this->getDescriptionTestData(array_merge(
ObjectsProvider::getCommands(),
array('command_mbstring' => new DescriptorCommandMbString())
));
}

public function getDescribeApplicationTestData()
{
return $this->getDescriptionTestData(array_merge(
ObjectsProvider::getApplications(),
array('application_mbstring' => new DescriptorApplicationMbString())
));
}

protected function getDescriptor()
{
return new TextDescriptor();
Expand Down
273 changes: 0 additions & 273 deletions 273 src/Symfony/Component/Console/Tests/Fixtures/application_mbstring.json

This file was deleted.

Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.