Phprest\Command\Route\GetTest::testDisplayedData PHP Метод

testDisplayedData() публичный Метод

public testDisplayedData ( )
    public function testDisplayedData()
    {
        $phprestApp = new PhprestApp(new Config('phprest-test', '2.3', true));
        $phprestApp->get('/2.3/get-the-answer-of-everything', 'Phprest\\Stub\\Controller::getTheAnswerOfEverything');
        $phprestApp->get('/2.3/get-welcome-message', function () {
            return new Response('Welcome!');
        });
        $cliApp = new ConsoleApp();
        $cliApp->add(new Get($phprestApp));
        $command = $cliApp->find('routes:get');
        $commandTester = new CommandTester($command);
        $commandTester->execute(array('command' => $command->getName()));
        $displayedData = $commandTester->getDisplay();
        $this->assertContains('| GET    | /2.3/get-the-answer-of-everything | Phprest\\Stub\\Controller::getTheAnswerOfEverything |', $displayedData);
        $this->assertContains('| GET    | /2.3/get-welcome-message          | Closure                                           |', $displayedData);
    }