platform/api/symfony/Bundle/FrameworkBundle/Tests/Functional/RouterDebugCommandTest.yaml

78 lines
4.3 KiB
YAML
Raw Normal View History

2024-09-02 17:44:11 +00:00
name: RouterDebugCommandTest
class_comment: '# * @group functional'
dependencies:
- name: Application
type: class
source: Symfony\Bundle\FrameworkBundle\Console\Application
- name: CommandCompletionTester
type: class
source: Symfony\Component\Console\Tester\CommandCompletionTester
- name: CommandTester
type: class
source: Symfony\Component\Console\Tester\CommandTester
properties: []
methods:
- name: testComplete
visibility: public
parameters:
- name: input
- name: expectedSuggestions
comment: "# * @group functional\n# */\n# class RouterDebugCommandTest extends AbstractWebTestCase\n\
# {\n# private Application $application;\n# \n# protected function setUp(): void\n\
# {\n# $kernel = static::createKernel(['test_case' => 'RouterDebug', 'root_config'\
\ => 'config.yml']);\n# $this->application = new Application($kernel);\n# }\n\
# \n# public function testDumpAllRoutes()\n# {\n# $tester = $this->createCommandTester();\n\
# $ret = $tester->execute([]);\n# $display = $tester->getDisplay();\n# \n# $this->assertSame(0,\
\ $ret, 'Returns 0 in case of success');\n# $this->assertStringContainsString('routerdebug_test',\
\ $display);\n# $this->assertStringContainsString('/test', $display);\n# $this->assertStringContainsString('/session',\
\ $display);\n# }\n# \n# public function testDumpOneRoute()\n# {\n# $tester =\
\ $this->createCommandTester();\n# $ret = $tester->execute(['name' => 'routerdebug_session_welcome']);\n\
# \n# $this->assertSame(0, $ret, 'Returns 0 in case of success');\n# $this->assertStringContainsString('routerdebug_session_welcome',\
\ $tester->getDisplay());\n# $this->assertStringContainsString('/session', $tester->getDisplay());\n\
# }\n# \n# public function testSearchMultipleRoutes()\n# {\n# $tester = $this->createCommandTester();\n\
# $tester->setInputs([3]);\n# $ret = $tester->execute(['name' => 'routerdebug'],\
\ ['interactive' => true]);\n# \n# $this->assertSame(0, $ret, 'Returns 0 in case\
\ of success');\n# $this->assertStringContainsString('Select one of the matching\
\ routes:', $tester->getDisplay());\n# $this->assertStringContainsString('routerdebug_test',\
\ $tester->getDisplay());\n# $this->assertStringContainsString('/test', $tester->getDisplay());\n\
# }\n# \n# public function testSearchMultipleRoutesWithoutInteraction()\n# {\n\
# $tester = $this->createCommandTester();\n# $ret = $tester->execute(['name' =>\
\ 'routerdebug'], ['interactive' => false]);\n# \n# $this->assertSame(0, $ret,\
\ 'Returns 0 in case of success');\n# $this->assertStringNotContainsString('Select\
\ one of the matching routes:', $tester->getDisplay());\n# $this->assertStringContainsString('routerdebug_session_welcome',\
\ $tester->getDisplay());\n# $this->assertStringContainsString('/session', $tester->getDisplay());\n\
# $this->assertStringContainsString('routerdebug_session_welcome_name', $tester->getDisplay());\n\
# $this->assertStringContainsString('/session/{name} ', $tester->getDisplay());\n\
# $this->assertStringContainsString('routerdebug_session_logout', $tester->getDisplay());\n\
# $this->assertStringContainsString('/session_logout', $tester->getDisplay());\n\
# $this->assertStringContainsString('routerdebug_test', $tester->getDisplay());\n\
# $this->assertStringContainsString('/test', $tester->getDisplay());\n# }\n# \n\
# public function testSearchWithThrow()\n# {\n# $tester = $this->createCommandTester();\n\
# \n# $this->expectException(\\InvalidArgumentException::class);\n# $this->expectExceptionMessage('The\
\ route \"gerard\" does not exist.');\n# \n# $tester->execute(['name' => 'gerard'],\
\ ['interactive' => true]);\n# }\n# \n# /**\n# * @dataProvider provideCompletionSuggestions"
- name: testShowAliases
visibility: public
parameters:
- name: format
comment: '# * @testWith ["txt"]
# * ["xml"]
# * ["json"]
# * ["md"]'
- name: provideCompletionSuggestions
visibility: public
parameters: []
comment: null
- name: createCommandTester
visibility: private
parameters: []
comment: null
traits:
- Symfony\Bundle\FrameworkBundle\Console\Application
- Symfony\Component\Console\Tester\CommandCompletionTester
- Symfony\Component\Console\Tester\CommandTester
interfaces: []