Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
- trailing whitespace
  • Loading branch information
weierophinney committed Mar 12, 2013
1 parent 98485c4 commit f05077e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/Prompt/Char.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function show()
$mask = array_unique($mask); // remove duplicates
$mask = implode("", $mask); // convert back to string
}

/**
* Read char from console
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Prompt/Confirm.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function __construct(
* @return bool
*/
public function show()
{
{
$char = parent::show();
if($this->ignoreCase) {
$response = strtolower($char) === strtolower($this->yesChar);
Expand Down
2 changes: 1 addition & 1 deletion test/Adapater/AbstractAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function testReadCharWithMask()
$char = $this->adapter->readChar('ar');
$this->assertEquals($char, 'a');
}

public function testReadCharWithMaskInsensitiveCase()
{
fwrite($this->adapter->stream, 'bAr');
Expand Down
8 changes: 4 additions & 4 deletions test/Prompt/CharTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ public function testCanPromptCharWithNewQuestionAndMask()
$this->assertEquals($text, "Give a number\n");
$this->assertEquals('1', $response);
}

public function testCanPromptCharWithIgnoreCaseByDefault()
{
fwrite($this->adapter->stream, 'FOObar');

$char = new Char();
$char->setEcho(false);
$char->setConsole($this->adapter);
Expand All @@ -86,11 +86,11 @@ public function testCanPromptCharWithIgnoreCaseByDefault()
ob_get_clean();
$this->assertEquals('F', $response);
}

public function testCanPromptCharWithoutIgnoreCase()
{
fwrite($this->adapter->stream, 'FOObar');

$char = new Char();
$char->setEcho(false);
$char->setConsole($this->adapter);
Expand Down
10 changes: 5 additions & 5 deletions test/Prompt/ConfirmTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function tearDown()
{
fclose($this->adapter->stream);
}

public function testCanPromptConfirm()
{
fwrite($this->adapter->stream, 'y');
Expand All @@ -46,7 +46,7 @@ public function testCanPromptConfirm()
$this->assertEquals($text, "Is ZF2 the best framework ?\n");
$this->assertTrue($response);
}

public function testCanPromptConfirmWithDefaultIgnoreCase()
{
fwrite($this->adapter->stream, 'Y');
Expand All @@ -60,7 +60,7 @@ public function testCanPromptConfirmWithDefaultIgnoreCase()
$this->assertEquals($text, "Is ZF2 the best framework ?\n");
$this->assertTrue($response);
}

public function testCanPromptConfirmWithoutIgnoreCase()
{
fwrite($this->adapter->stream, 'Yn');
Expand All @@ -75,7 +75,7 @@ public function testCanPromptConfirmWithoutIgnoreCase()
$this->assertEquals($text, "Is ZF2 the best framework ?\n");
$this->assertFalse($response);
}

public function testCanPromptConfirmWithYesNoCharChanged()
{
fwrite($this->adapter->stream, 'on0');
Expand All @@ -89,7 +89,7 @@ public function testCanPromptConfirmWithYesNoCharChanged()
$this->assertEquals($text, "Is ZF2 the best framework ?\n");
$this->assertFalse($response);
}

public function testCanPromptConfirmWithYesNoCharChangedWithSetter()
{
fwrite($this->adapter->stream, 'oaB');
Expand Down

0 comments on commit f05077e

Please sign in to comment.