Mercurial > hg > isophonics-drupal-site
annotate vendor/psy/psysh/test/Psy/Test/Input/CodeArgumentTest.php @ 3:e11175134f4e
Attempt to introduce editable version of theme
author | Chris Cannam |
---|---|
date | Tue, 05 Dec 2017 11:25:38 +0000 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 /* |
Chris@0 | 4 * This file is part of Psy Shell. |
Chris@0 | 5 * |
Chris@0 | 6 * (c) 2012-2017 Justin Hileman |
Chris@0 | 7 * |
Chris@0 | 8 * For the full copyright and license information, please view the LICENSE |
Chris@0 | 9 * file that was distributed with this source code. |
Chris@0 | 10 */ |
Chris@0 | 11 |
Chris@0 | 12 namespace Psy\Tests\Input; |
Chris@0 | 13 |
Chris@0 | 14 use Psy\Input\CodeArgument; |
Chris@0 | 15 use Symfony\Component\Console\Input\InputArgument; |
Chris@0 | 16 |
Chris@0 | 17 class CodeArgumentTest extends \PHPUnit\Framework\TestCase |
Chris@0 | 18 { |
Chris@0 | 19 /** |
Chris@0 | 20 * @dataProvider getInvalidModes |
Chris@0 | 21 * @expectedException \InvalidArgumentException |
Chris@0 | 22 */ |
Chris@0 | 23 public function testInvalidModes($mode) |
Chris@0 | 24 { |
Chris@0 | 25 new CodeArgument('wat', $mode); |
Chris@0 | 26 } |
Chris@0 | 27 |
Chris@0 | 28 public function getInvalidModes() |
Chris@0 | 29 { |
Chris@0 | 30 return array( |
Chris@0 | 31 array(InputArgument::IS_ARRAY), |
Chris@0 | 32 array(InputArgument::IS_ARRAY | InputArgument::REQUIRED), |
Chris@0 | 33 array(InputArgument::IS_ARRAY | InputArgument::OPTIONAL), |
Chris@0 | 34 ); |
Chris@0 | 35 } |
Chris@0 | 36 |
Chris@0 | 37 /** |
Chris@0 | 38 * @dataProvider getValidModes |
Chris@0 | 39 */ |
Chris@0 | 40 public function testValidModes($mode) |
Chris@0 | 41 { |
Chris@0 | 42 $this->assertInstanceOf('Psy\Input\CodeArgument', new CodeArgument('yeah', $mode)); |
Chris@0 | 43 } |
Chris@0 | 44 |
Chris@0 | 45 public function getValidModes() |
Chris@0 | 46 { |
Chris@0 | 47 return array( |
Chris@0 | 48 array(InputArgument::REQUIRED), |
Chris@0 | 49 array(InputArgument::OPTIONAL), |
Chris@0 | 50 ); |
Chris@0 | 51 } |
Chris@0 | 52 } |