<commit_before><commit_msg>Added Unit Test<commit_after><?php
namespace Craft;

class TranslateTest extends BaseTest 
{
    
    public function setUp()
    {
    
        // PHPUnit complains about not settings this
        date_default_timezone_set('UTC');
    
        // Load plugins
        $pluginsService = craft()->getComponent('plugins');
        $pluginsService->loadPlugins();
        
        // Set template path
        craft()->path->setTemplatesPath(craft()->path->getCpTemplatesPath());
    
    } 
    
    public function testGet() 
    {
    
        // Set up criteria, get plugin translations
        $criteria = craft()->elements->getCriteria('Translate');
        $criteria->status = null;
        $criteria->locale = 'en_us';
        $criteria->source = craft()->path->getPluginsPath();
        
        // Get translations, always finding some because they're at least in this plugin
        $translations = craft()->translate->get($criteria);
                        
        // The count should thus be positive
        $this->assertTrue((bool)count($translations));
        
    }
    
}
{'fraction_non_alphanumeric': 0.12007168458781362, 'fraction_numerical': 0.0, 'mean_word_length': 2.1464788732394364, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 19, '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': '83297', 'n_tokens_mistral': 291, 'n_tokens_neox': 286, 'n_words': 66}