Skip to content

Commit 5cec107

Browse files
committed
I sincerely hope that's the last of them
1 parent 93c7ee0 commit 5cec107

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

test/lib/PythonPortedTest.php

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,14 @@ function testOption()
6060

6161
public function testOptionName()
6262
{
63-
$this->assertEquals((new Option('-h', null))->name, '-h');
64-
$this->assertEquals((new Option('-h', '--help'))->name, '--help');
65-
$this->assertEquals((new Option(null, '--help'))->name, '--help');
63+
$option = new Option('-h', null);
64+
$this->assertEquals($option->name, '-h');
65+
66+
$option = new Option('-h', '--help');
67+
$this->assertEquals($option->name, '--help');
68+
69+
$option = new Option(null, '--help');
70+
$this->assertEquals($option->name, '--help');
6671
}
6772

6873
public function testCommands()
@@ -788,10 +793,10 @@ function testDefaultValueForPositionalArguments()
788793
array('<p>'=>null));
789794
# {'<p>'=>'x'}
790795
$this->assertEquals($this->docopt("usage: prog [<p>]...\n\n<p> [default: x y]", '')->args,
791-
array('<p>'=>[]));
796+
array('<p>'=>array()));
792797
# {'<p>'=>['x', 'y']}
793798
$this->assertEquals($this->docopt("usage: prog [<p>]...\n\n<p> [default: x y]", 'this')->args,
794-
array('<p>'=>['this']));
799+
array('<p>'=>array('this')));
795800
# {'<p>'=>['this']}
796801
}
797802

@@ -826,10 +831,10 @@ public function testOptionsFirst()
826831
{
827832
$this->assertEquals($this->docopt('usage: prog [--opt] [<args>...]',
828833
'--opt this that')->args, array('--opt'=>true,
829-
'<args>'=>['this', 'that']));
834+
'<args>'=>array('this', 'that')));
830835
$this->assertEquals($this->docopt('usage: prog [--opt] [<args>...]',
831836
'this that --opt')->args, array('--opt'=>true,
832-
'<args>'=>['this', 'that']));
837+
'<args>'=>array('this', 'that')));
833838
$this->assertEquals($this->docopt('usage: prog [--opt] [<args>...]',
834839
'this that --opt',
835840
array('optionsFirst'=>true))->args, array('--opt'=>false,

0 commit comments

Comments
 (0)