mirror of
https://github.com/TheAlgorithms/PHP.git
synced 2025-07-16 22:41:16 +02:00
Merge pull request #161 from TheAlgorithms/fix-deprecated-test-class
test: fix railfence cipher test improper class and func naming
This commit is contained in:
@@ -5,9 +5,9 @@ use PHPUnit\Framework\TestCase;
|
|||||||
require_once __DIR__ . '/../../vendor/autoload.php'; // Adjust the path as needed
|
require_once __DIR__ . '/../../vendor/autoload.php'; // Adjust the path as needed
|
||||||
require_once __DIR__ . '/../../Ciphers/RailfenceCipher.php'; // Adjust the path as needed
|
require_once __DIR__ . '/../../Ciphers/RailfenceCipher.php'; // Adjust the path as needed
|
||||||
|
|
||||||
class RailFenceCipherTest extends TestCase
|
class RailfenceCipherTest extends TestCase
|
||||||
{
|
{
|
||||||
public function testRailFenceCipherCase1()
|
public function testRailfenceCipherCase1()
|
||||||
{
|
{
|
||||||
$plainMessage = "ABCDEF";
|
$plainMessage = "ABCDEF";
|
||||||
$rails = 3;
|
$rails = 3;
|
||||||
@@ -15,7 +15,7 @@ class RailFenceCipherTest extends TestCase
|
|||||||
$decodedMessage = Raildecode($cipherMessage, $rails);
|
$decodedMessage = Raildecode($cipherMessage, $rails);
|
||||||
$this->assertEquals($plainMessage, $decodedMessage);
|
$this->assertEquals($plainMessage, $decodedMessage);
|
||||||
}
|
}
|
||||||
public function testRailFenceCipherCase2()
|
public function testRailfenceCipherCase2()
|
||||||
{
|
{
|
||||||
$plainMessage = "THIS IS RAILFENCE";
|
$plainMessage = "THIS IS RAILFENCE";
|
||||||
$rails = 3;
|
$rails = 3;
|
||||||
|
Reference in New Issue
Block a user