4 * This file is part of Psy Shell.
6 * (c) 2012-2018 Justin Hileman
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Psy\Test\Formatter;
14 use Psy\Formatter\DocblockFormatter;
16 class DocblockFormatterTest extends \PHPUnit\Framework\TestCase
21 * @author Justin Hileman <justin@justinhileman.info>
23 * @throws InvalidArgumentException if $foo is empty
25 * @param mixed $foo It's a foo thing
26 * @param int $bar This is definitely bar
28 * @return string A string of no consequence
30 private function methodWithDocblock($foo, $bar = 1)
33 throw new \InvalidArgumentException();
36 return 'method called';
39 public function testFormat()
42 <comment>Description:</comment>
45 <comment>Throws:</comment>
46 <info>InvalidArgumentException </info> if \$foo is empty
48 <comment>Param:</comment>
49 <info>mixed </info> <strong>\$foo </strong> It's a foo thing
50 <info>int </info> <strong>\$bar </strong> This is definitely bar
52 <comment>Return:</comment>
53 <info>string </info> A string of no consequence
55 <comment>Author:</comment> Justin Hileman \<justin@justinhileman.info>
60 DocblockFormatter::format(new \ReflectionMethod($this, 'methodWithDocblock'))