Sha256: 38dc20ec5fedd9d068847b4d369c1984d450f5f5f5756265fcdec7d98f746c23

Contents?: true

Size: 1.27 KB

Versions: 93

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

93 entries across 93 versions & 1 rubygems

Version Path
trackler-2.0.6.40 tracks/php/exercises/acronym/acronym_test.php
trackler-2.0.6.39 tracks/php/exercises/acronym/acronym_test.php
trackler-2.0.6.38 tracks/php/exercises/acronym/acronym_test.php
trackler-2.0.6.37 tracks/php/exercises/acronym/acronym_test.php
trackler-2.0.6.36 tracks/php/exercises/acronym/acronym_test.php
trackler-2.0.6.35 tracks/php/exercises/acronym/acronym_test.php
trackler-2.0.6.34 tracks/php/exercises/acronym/acronym_test.php
trackler-2.0.6.33 tracks/php/exercises/acronym/acronym_test.php
trackler-2.0.6.32 tracks/php/exercises/acronym/acronym_test.php
trackler-2.0.6.31 tracks/php/exercises/acronym/acronym_test.php
trackler-2.0.6.30 tracks/php/exercises/acronym/acronym_test.php
trackler-2.0.6.29 tracks/php/exercises/acronym/acronym_test.php
trackler-2.0.6.28 tracks/php/exercises/acronym/acronym_test.php
trackler-2.0.6.27 tracks/php/exercises/acronym/acronym_test.php
trackler-2.0.6.26 tracks/php/exercises/acronym/acronym_test.php
trackler-2.0.6.25 tracks/php/exercises/acronym/acronym_test.php
trackler-2.0.6.24 tracks/php/exercises/acronym/acronym_test.php
trackler-2.0.6.23 tracks/php/exercises/acronym/acronym_test.php
trackler-2.0.6.22 tracks/php/exercises/acronym/acronym_test.php
trackler-2.0.6.21 tracks/php/exercises/acronym/acronym_test.php