PHP Classes

File: tests/DreamweaverTest.php

Recommend this page to a friend!
  Classes of Johnny Mast   PHP Dreamweaver Password Decoder and Encoder   tests/DreamweaverTest.php   Download  
File: tests/DreamweaverTest.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: PHP Dreamweaver Password Decoder and Encoder
Decode or encode passwords used by Dreamweaver
Author: By
Last change:
Date: 7 years ago
Size: 825 bytes


Class file image Download

 * @@coversDefaultClass \Redbox\Dreamweaver\Dreamweaver
class DreamweaverTest extends \PHPUnit_Framework_TestCase

     * Test if de encode method encodes the password correctly
public function testDreamweaverEncode() {
$src = 'Hard2CrackPassword1982AplhaBravoDelta';
$this->assertEquals(\Redbox\Dreamweaver\Dreamweaver::encode_password($src), '48627467364878686B745A6C7F80857E8275434C4C47578784817B5D8E7E948E64868E9785');

     * Test if the decode method decodes correctly
public function testDreamweaverDecode() {
$src = '48627467364878686B745A6C7F80857E8275434C4C47578784817B5D8E7E948E64868E9785';
$this->assertEquals(\Redbox\Dreamweaver\Dreamweaver::decode_password($src), 'Hard2CrackPassword1982AplhaBravoDelta');