Sha256: d2ddf044b1a1e59f84e5f988ecc8261e2cbf2cf6bd4088d674f635addf823fb6

Contents?: true

Size: 1.36 KB

Versions: 96

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

96 entries across 96 versions & 1 rubygems

Version Path
trackler-2.0.6.0 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.0.5.18 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.0.5.17 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.0.5.16 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.0.5.15 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.0.5.14 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.0.5.13 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.0.5.12 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.0.5.11 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.0.5.10 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.0.5.9 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.0.5.8 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.0.5.7 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.0.5.6 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.0.5.5 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.0.5.4 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.0.5.3 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.0.5.2 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.0.5.1 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php
trackler-2.0.5.0 tracks/php/exercises/atbash-cipher/atbash-cipher_test.php