<commit_before><?php
/**
 * Copyright (c) 2017 <NAME> (joshp.xyz).
 */

namespace J0sh0nat0r\SimpleCache\Tests;

use J0sh0nat0r\SimpleCache\Drivers\Redis as RedisDriver;
use J0sh0nat0r\SimpleCache\Exceptions\DriverInitializationFailedException;
use J0sh0nat0r\SimpleCache\Exceptions\DriverOptionsInvalidException;

/**
 * Tests the Redis driver.
 *
 * @covers \J0sh0nat0r\SimpleCache\Drivers\Redis
 */
class RedisDriverTest extends DriverTestCase
{
    public function setUp()
    {
        $this->driver = new RedisDriver([
            'host' => 'localhost',
        ]);
    }

    /**
     * @expectedException DriverOptionsInvalidException
     */
    public function testHostOptionIsRequired()
    {
        new RedisDriver([]);
    }

    /**
     * @expectedException DriverOptionsInvalidException
     */
    public function testHostOptionMustBeString()
    {
        new RedisDriver([
            'host' => 011001100110111101101111
        ]);
    }

    /**
     * @expectedException DriverOptionsInvalidException
     */
    public function testPortOptionMustBeNumeric()
    {
        new RedisDriver([
            'host' => 'localhost',
            'port' => 'foo'
        ]);
    }

    /**
     * @expectedException DriverOptionsInvalidException
     */
    public function testPasswordOptionMustBeString()
    {
        new RedisDriver([
            'host' => 'localhost',
            'password' => ['<PASSWORD>']
        ]);
    }

    /**
     * @expectedException DriverOptionsInvalidException
     */
    public function testDatabaseOptionMustBeNumeric()
    {
        new RedisDriver([
            'host' => 'localhost',
            'database' => 'foo'
        ]);
    }

    /**
     * @expectedException DriverInitializationFailedException
     */
    public function testConnectionErrorException()
    {
        new RedisDriver([
            'host' => '0.0.0.0'
        ]);
    }
}<commit_msg>Use fully qualified class names for @expectedException<commit_after><?php
/**
 * Copyright (c) 2017 <NAME> (joshp.xyz).
 */

namespace J0sh0nat0r\SimpleCache\Tests;

use J0sh0nat0r\SimpleCache\Drivers\Redis as RedisDriver;

/**
 * Tests the Redis driver.
 *
 * @covers \J0sh0nat0r\SimpleCache\Drivers\Redis
 */
class RedisDriverTest extends DriverTestCase
{
    public function setUp()
    {
        $this->driver = new RedisDriver([
            'host' => 'localhost',
        ]);
    }

    /**
     * @expectedException \J0sh0nat0r\SimpleCache\Exceptions\DriverOptionsInvalidException
     */
    public function testHostOptionIsRequired()
    {
        new RedisDriver([]);
    }

    /**
     * @expectedException \J0sh0nat0r\SimpleCache\Exceptions\DriverOptionsInvalidException
     */
    public function testHostOptionMustBeString()
    {
        new RedisDriver([
            'host' => 011001100110111101101111
        ]);
    }

    /**
     * @expectedException \J0sh0nat0r\SimpleCache\Exceptions\DriverOptionsInvalidException
     */
    public function testPortOptionMustBeNumeric()
    {
        new RedisDriver([
            'host' => 'localhost',
            'port' => 'foo'
        ]);
    }

    /**
     * @expectedException \J0sh0nat0r\SimpleCache\Exceptions\DriverOptionsInvalidException
     */
    public function testPasswordOptionMustBeString()
    {
        new RedisDriver([
            'host' => 'localhost',
            'password' => ['<PASSWORD>']
        ]);
    }

    /**
     * @expectedException \J0sh0nat0r\SimpleCache\Exceptions\DriverOptionsInvalidException
     */
    public function testDatabaseOptionMustBeNumeric()
    {
        new RedisDriver([
            'host' => 'localhost',
            'database' => 'foo'
        ]);
    }

    /**
     * @expectedException \J0sh0nat0r\SimpleCache\Exceptions\DriverOptionsInvalidException
     */
    public function testConnectionErrorException()
    {
        new RedisDriver([
            'host' => '0.0.0.0'
        ]);
    }
}
{'fraction_non_alphanumeric': 0.11727295853472398, 'fraction_numerical': 0.026965148817094886, 'mean_word_length': 2.318143459915612, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '7189290', 'n_tokens_mistral': 1199, 'n_tokens_neox': 1143, 'n_words': 186}