Sha256: 0484f0e9b5c6d17f02765dc2959f0e30c9b63c0e83b41798cb89b5e6224d6a10

Contents?: true

Size: 1.36 KB

Versions: 300

Compression:

Stored size: 1.36 KB

Contents

<?php

require "atbash-cipher.php";

class AtbashTest extends PHPUnit\Framework\TestCase
{
    public function testEncodeNo()
    {
        $this->assertEquals('ml', encode('no'));
    }

    public function testEncodeYes()
    {
        $this->markTestSkipped();
        $this->assertEquals('bvh', encode('yes'));
    }

    public function testEncodeOmg()
    {
        $this->markTestSkipped();
        $this->assertEquals('lnt', encode('OMG'));
    }

    public function testEncodeOmgWithSpaces()
    {
        $this->markTestSkipped();
        $this->assertEquals('lnt', encode('O M G'));
    }

    public function testEncodeLongWord()
    {
        $this->markTestSkipped();
        $this->assertEquals('nrmwy oldrm tob', encode('mindblowingly'));
    }

    public function testEncodeNumbers()
    {
        $this->markTestSkipped();
        $this->assertEquals('gvhgr mt123 gvhgr mt', encode('Testing, 1 2 3, testing.'));
    }

    public function testEncodeSentence()
    {
        $this->markTestSkipped();
        $this->assertEquals('gifgs rhurx grlm', encode('Truth is fiction.'));
    }

    public function testEncodeAllTheThings()
    {
        $this->markTestSkipped();
        $plaintext = 'The quick brown fox jumps over the lazy dog.';
        $encoded = 'gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt';
        $this->assertEquals($encoded, encode($plaintext));
    }
}

Version data entries

300 entries across 300 versions & 1 rubygems

Version Path
trackler-2.2.1.159 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.2.1.158 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.2.1.157 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.2.1.156 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.2.1.155 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.2.1.154 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.2.1.153 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.2.1.152 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.2.1.151 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.2.1.150 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.2.1.149 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.2.1.148 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.2.1.147 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.2.1.146 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.2.1.145 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.2.1.144 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.2.1.143 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.2.1.142 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.2.1.141 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.2.1.140 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php