1<?php 2/** 3 * Test the Horde_Auth:: class. 4 * 5 * Copyright 2010-2017 Horde LLC (http://www.horde.org/) 6 * 7 * See the enclosed file COPYING for license information (LGPL). If you 8 * did not receive this file, see http://www.horde.org/licenses/lgpl21. 9 * 10 * @category Horde 11 * @package Auth 12 * @subpackage UnitTests 13 * @author Gunnar Wrobel <wrobel@pardus.de> 14 * @license http://www.horde.org/licenses/lgpl21 LGPL-2.1 15 * @link http://pear.horde.org/index.php?package=Auth 16 */ 17class Horde_Auth_Unit_AuthTest extends Horde_Auth_TestCase 18{ 19 /** 20 * @dataProvider getCredentials 21 */ 22 public function testGetSalt($encryption, $password, $salt) 23 { 24 $this->assertEquals($salt, Horde_Auth::getSalt($encryption, $password, 'foobar')); 25 } 26 27 /** 28 * @dataProvider getCredentials 29 */ 30 public function testGetCryptedPassword($encryption, $password, $salt, $show_encryption = false) 31 { 32 $this->assertEquals($password, Horde_Auth::getCryptedPassword('foobar', $password, $encryption, $show_encryption)); 33 } 34} 35