Sha256: c3dd6b2ff1d172d76670fdb6d6a379cc03c7068700d54e6209d6104d04aa5801

Contents?: true

Size: 1.27 KB

Versions: 300

Compression:

Stored size: 1.27 KB

Contents

<?php

require_once 'acronym.php';

class AcronymTest extends PHPUnit\Framework\TestCase
{
    public function testBasicTitleCase()
    {
        $this->assertEquals('PNG', acronym('Portable Network Graphics'));
    }

    public function testLowerCaseWord()
    {
        $this->markTestSkipped();

        $this->assertEquals('ROR', acronym('Ruby on Rails'));
    }

    public function testCamelCase()
    {
        $this->markTestSkipped();

        $this->assertEquals('HTML', acronym('HyperText Markup Language'));
    }

    public function testAllCapsWords()
    {
        $this->markTestSkipped();

        $this->assertEquals('PHP', acronym('PHP: Hypertext Preprocessor'));
    }

    public function testHyphenated()
    {
        $this->markTestSkipped();

        $this->assertEquals('CMOS', acronym('Complementary metal-oxide semiconductor'));
    }

    // Additional points for making the following tests pass

    public function testOneWordIsNotAbbreviated()
    {
        $this->markTestSkipped();

        $this->assertEmpty(acronym('Word'));
    }

    public function testUnicode()
    {
        $this->markTestSkipped();

        $phrase = 'Специализированная процессорная часть';
        $this->assertEquals('СПЧ', acronym($phrase));
    }
}

Version data entries

300 entries across 300 versions & 1 rubygems

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