<commit_before><?php

$app = 'sympal';
require_once(dirname(__FILE__).'/../bootstrap/unit.php');

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

$configuration->loadHelpers(array('I18N'));

function installPlugin($name, $t)
{
  $manager = sfSympalPluginManager::getActionInstance($name, 'install');
  $manager->install();

  $contentTypeName = $manager->getContentTypeForPlugin($name);
  $contentType = Doctrine_Core::getTable('sfSympalContentType')->findOneByName($contentTypeName);
  $t->is($contentType['name'], $contentTypeName);
  $t->is($contentType['label'], sfInflector::humanize(sfInflector::tableize($contentTypeName)));
  $t->is($contentType['plugin_name'], $name);

  $menuItem = Doctrine_Core::getTable('sfSympalMenuItem')->findOneByName($contentTypeName);
  $t->is($menuItem['name'], $contentTypeName);
}

function uninstallPlugin($name, $t)
{
  $manager = sfSympalPluginManager::getActionInstance($name, 'uninstall');
  $manager->uninstall(true);<commit_msg>[1.4][sfSympalPlugin] Updating tests after adding sfSympal prefix<commit_after><?php

$app = 'sympal';
require_once(dirname(__FILE__).'/../bootstrap/unit.php');

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

$configuration->loadHelpers(array('I18N'));

function installPlugin($name, $t)
{
  $manager = sfSympalPluginManager::getActionInstance($name, 'install');
  $manager->install();

  $contentTypeName = $manager->getContentTypeForPlugin($name);
  $contentType = Doctrine_Core::getTable('sfSympalContentType')->findOneByName($contentTypeName);
  $t->is($contentType['name'], $contentTypeName);
  $t->is($contentType['label'], sfInflector::humanize(sfInflector::tableize(str_replace('sfSympal', null, $contentTypeName))));
  $t->is($contentType['plugin_name'], $name);

  $menuItem = Doctrine_Core::getTable('sfSympalMenuItem')->findOneByName($contentTypeName);
  $t->is($menuItem['name'], $contentTypeName);
}

function uninstallPlugin($name, $t)
{
  $manager = sfSympalPluginManager::getActionInstance($name, 'uninstall');
  $manager->uninstall(true);
{'fraction_non_alphanumeric': 0.18820638820638821, 'fraction_numerical': 0.004914004914004914, 'mean_word_length': 9.387755102040817, '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': '4020605', 'n_tokens_mistral': 665, 'n_tokens_neox': 661, 'n_words': 83}