<auto> merging hotfixes. re-added tests into repository.

This commit is contained in:
Taylor Otwell
2012-03-27 15:47:04 -05:00
parent 8b4c17a8b6
commit 9eabd73b64
79 changed files with 6418 additions and 0 deletions

37
tests/cases/hash.test.php Normal file
View File

@@ -0,0 +1,37 @@
<?php
class HashTest extends PHPUnit_Framework_TestCase {
/**
* Test the Hash::make method.
*
* @group laravel
*/
public function testHashProducesValidBcryptHash()
{
$this->assertTrue(strlen(Hash::make('taylor')) == 60);
}
/**
* Test the Hash::check method.
*
* @group laravel
*/
public function testHashCheckFailsWhenNotMatching()
{
$hash = Hash::make('taylor');
$this->assertFalse(Hash::check('foo', $hash));
}
/**
* Test the Hash::check method.
*
* @group laravel
*/
public function testHashCheckPassesWhenMatches()
{
$this->assertTrue(Hash::check('taylor', Hash::make('taylor')));
}
}