菜谱项目

JWTGenerateCommandTest.php 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /*
  3. * This file is part of jwt-auth.
  4. *
  5. * (c) Sean Tymon <tymon148@gmail.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Tymon\JWTAuth\Test;
  11. use Illuminate\Foundation\Application;
  12. use Tymon\JWTAuth\Commands\JWTGenerateCommand;
  13. use Symfony\Component\Console\Input\ArrayInput;
  14. use Symfony\Component\Console\Output\NullOutput;
  15. use Symfony\Component\Console\Tester\CommandTester;
  16. class JWTGenerateCommandTest extends \PHPUnit_Framework_TestCase
  17. {
  18. public function setUp()
  19. {
  20. $this->command = new JWTGenerateCommand();
  21. $this->tester = new CommandTester($this->command);
  22. }
  23. /** @test */
  24. public function it_shoud_generate_random_key()
  25. {
  26. // $app = new Application();
  27. // $app['path.base'] = '';
  28. // $this->command->setLaravel($app);
  29. // $this->runCommand($this->command);
  30. }
  31. protected function runCommand($command, $input = [])
  32. {
  33. return $command->run(new ArrayInput($input), new NullOutput);
  34. }
  35. }