<commit_before><?php

namespace WordSoapServerTest\Service;

use WordSoapServer\Service\WordService;

class WordServiceTest
    extends \PHPUnit_Framework_TestCase
{

    public function testWordFlip()
    {
        $service = new WordService();

        $this->assertEquals('olleH', $service->wordFlip('Hello'));
    }
}
<commit_msg>* More failing tests for WordService<commit_after><?php

namespace WordSoapServerTest\Service;

use WordSoapServer\Service\WordService;

class WordServiceTest
    extends \PHPUnit_Framework_TestCase
{

    /**
     * Flip most frequently used words
     */
    public function testWordFlip()
    {
        $service = new WordService();

        $this->assertEquals('olleH', $service->wordFlip('Hello'));
    }

    /**
     * What happed then flipping empty text
     */
    public function testWordFlipEmptyString()
    {
        $service = new WordService();

        $this->assertEquals('', $service->wordFlip(''));
    }

    /**
     * Generate random word and try to flip it
     */
    public function testWordFlipRandomWord()
    {
        $service = new WordService();

        $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
        $string = $stringFlipped = '';
        for ($i = 0; $i < 10; $i++) {
            $char = $characters[rand(0, strlen($characters))];
            $string = $string.$char;
            $stringFlipped = $char.$stringFlipped;
        }

        $this->assertEquals($stringFlipped, $service->wordFlip($string));
    }

    /**
     * Flipping too long word should throw validation exception
     */
    public function testWordFlipTooLongThrowsException()
    {
        $service = new WordService();

        $this->assertEquals('', $service->wordFlip(str_repeat('a', 64)));
        $this->setExpectedException('InvalidArgumentException');
        $this->assertEquals('', $service->wordFlip(str_repeat('a', 65)));
    }
}

{'fraction_non_alphanumeric': 0.1314968814968815, 'fraction_numerical': 0.009355509355509356, 'mean_word_length': 2.920570264765784, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5327332', 'n_tokens_mistral': 585, 'n_tokens_neox': 560, 'n_words': 112}