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

Commit

Permalink
Fixed PASS command, added unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
epochblue committed May 31, 2013
1 parent 24c0110 commit 4075e62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Philip/IRC/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public static function user($username, $realname)
*/
public static function pass($password)
{
return new self('PASS', $password);
return sprintf('%s %s', 'PASS', $password);
}

/**
Expand Down
2 changes: 2 additions & 0 deletions tests/units/Philip/IRC/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public function testClass()
->isEqualTo('USER ' . $nick . ' 8 * :' . $name)
->string(TestedClass::nick($nick))
->isEqualTo('NICK :' . $nick)
->string(TestedClass::pass($pass = uniqid()))
->isEqualTo('PASS ' . $pass)
;
}
}

0 comments on commit 4075e62

Please sign in to comment.