for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Aimeos\MShop\Common\Helper\Password;
/**
* @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
* @copyright Aimeos (aimeos.org), 2015-2018
*/
class Typo3Test extends \PHPUnit\Framework\TestCase
{
public function testException()
$this->setExpectedException( '\\Aimeos\\MShop\\Exception' );
new \Aimeos\MShop\Common\Helper\Password\Typo3( [] );
}
public function testEncodeNull()
$object = new \Aimeos\MShop\Common\Helper\Password\Typo3( array( 'object' => null ) );
$this->assertEquals( 'unittest', $object->encode( 'unittest', 'salt' ) );
public function testEncodeObject()
$object = new \Aimeos\MShop\Common\Helper\Password\Typo3( array( 'object' => new TestPasswordHasherTypo3() ) );
$this->assertEquals( 'abcd', $object->encode( 'unittest', 'salt' ) );
class TestPasswordHasherTypo3
public function getHashedPassword( $password, $salt )
$password
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$salt
return 'abcd';
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.