Skip to content

Commit

Permalink
Merge branch 'master' of github.com:/Room-11/Jeeves
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveRandom committed Apr 27, 2016
2 parents 2ee442f + 8588ae2 commit d7cec1e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/OpenId/Credentials.php
Expand Up @@ -8,7 +8,7 @@ class Credentials {

public function __construct(EmailAddress $emailAddress, Password $password) {
$this->emailAddress = $emailAddress;
$this->password = $password;
$this->password = $password;
}

public function getEmailAddress(): EmailAddress {
Expand Down
19 changes: 19 additions & 0 deletions tests/src/OpenId/EmailAddressTest.php
@@ -0,0 +1,19 @@
<?php declare(strict_types=1);

namespace Room11\Jeeves\Tests\OpenId;

use Room11\Jeeves\OpenId\EmailAddress;
use Room11\Jeeves\OpenId\InvalidEmailAddressException;

class EmailAddressTest extends \PHPUnit_Framework_TestCase
{
public function testConstructorThrowsInInvalidEmailAddress() {
$this->setExpectedException(InvalidEmailAddressException::class);

new EmailAddress("invalidemailaddress");
}

public function testToString() {
$this->assertSame("peehaa@example.com", (string) new EmailAddress("peehaa@example.com"));
}
}
12 changes: 12 additions & 0 deletions tests/src/OpenId/PasswordTest.php
@@ -0,0 +1,12 @@
<?php declare(strict_types=1);

namespace Room11\Jeeves\Tests\OpenId;

use Room11\Jeeves\OpenId\Password;

class PasswordTest extends \PHPUnit_Framework_TestCase
{
public function testToString() {
$this->assertSame("mytotallyawesomepassword", (string) new Password("mytotallyawesomepassword"));
}
}

0 comments on commit d7cec1e

Please sign in to comment.