<commit_before><?php

/**
 * sfRedis tests.
 */
include dirname(__FILE__).'/../bootstrap/unit.php';

$t = new lime_test(13, new lime_output_color());

require_once dirname(__FILE__).'/../fixtures/objects.php';

sfRedis::getClient()->flushdb();

// persist should fail when trying to persist a non-redis entity

    $t->comment('persist should fail when trying to persist a non-redis entity');

    $em = sfRedisEntityManager::create();
    $dt = new DateTime();
    
    try {
        $em->persist($dt);
        $t->fail('->persist() should fail when trying to persist a non-redis entity');
    } catch(sfRedisEntityManagerException $e) {
        $t->pass('->persist() should fail when trying to persist a non-redis entity');
    }
    
    // this one extends the sfRedisObject but lacks a doc-comment
    
    try {
        $broken = new BrokenObject();
        $t->fail('threw an exception when trying to play with a non-redis entity');
    } catch(sfRedisException $e) {
        $t->pass('threw an exception when trying to play with a non-redis entity');
    }
    
// persist should be successful when trying to persist a redis entity

    $t->comment('persist should be successful when trying to persist a redis entity');<commit_msg>fixed naming conventions<commit_after><?php

/**
 * sfRedis tests.
 */
include dirname(__FILE__).'/../bootstrap/unit.php';

$t = new lime_test(13, new lime_output_color());

require_once dirname(__FILE__).'/../fixtures/objects.php';

sfRedis::getClient()->flushdb();

// persist should fail when trying to persist a non-redis entity

    $t->comment('persist should fail when trying to persist a non-redis entity');

    $em = sfRedisEntityManager::create();
    $dt = new DateTime();
    
    try {
        $em->persist($dt);
        $t->fail('->persist() should fail when trying to persist a non-redis entity');
    } catch(sfRedisException $e) {
        $t->pass('->persist() should fail when trying to persist a non-redis entity');
    }
    
    // this one extends the sfRedisObject but lacks a doc-comment
    
    try {
        $broken = new BrokenObject();
        $t->fail('threw an exception when trying to play with a non-redis entity');
    } catch(sfRedisException $e) {
        $t->pass('threw an exception when trying to play with a non-redis entity');
    }
    
// persist should be successful when trying to persist a redis entity

    $t->comment('persist should be successful when trying to persist a redis entity');
{'fraction_non_alphanumeric': 0.12924071082390953, 'fraction_numerical': 0.0016155088852988692, 'mean_word_length': 3.1077943615257047, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '4997129', 'n_tokens_mistral': 765, 'n_tokens_neox': 728, 'n_words': 243}