Passed
Push — master ( 644dc1...978859 )
by Aimeos
13:56
created

StandardTest::testHash()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * @license LGPLv3, https://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2021-2023
6
 */
7
8
9
namespace Aimeos\Base\Password;
10
11
12
class StandardTest extends \PHPUnit\Framework\TestCase
13
{
14
	private $object;
15
16
17
	protected function setUp() : void
18
	{
19
		$this->object = new \Aimeos\Base\Password\Standard();
20
	}
21
22
23
	protected function tearDown() : void
24
	{
25
		unset( $this->object );
26
	}
27
28
29
	public function testHash()
30
	{
31
		$this->assertStringStartsWith( '$2y$10$', $this->object->hash( 'unittest' ) );
32
	}
33
34
35
	public function testVerify()
36
	{
37
		$this->assertTrue( $this->object->verify( 'unittest', $this->object->hash( 'unittest' ) ) );
38
	}
39
}
40