<commit_before><?php if ( ! defined('BASEPATH')) exit('Invalid file request.');

/**
 * OmniLog module control panel tests.
 *
 * @author          <NAME> (http://github.com/experience/)
 * @copyright       Experience Internet
 * @package         Omnilog
 */

require_once dirname(__FILE__) .'/../mcp.omnilog.php';
require_once dirname(__FILE__) .'/../classes/omnilog_entry.php';
require_once dirname(__FILE__) .'/../models/omnilog_model.php';

class Test_omnilog_mcp extends Testee_unit_test_case {

  private $_model;
  private $_subject;


  /* --------------------------------------------------------------
   * PUBLIC METHODS
   * ------------------------------------------------------------ */
  
  /**
   * Constructor.
   *
   * @access  public
   * @return  void
   */
  public function setUp()
  {
      parent::setUp();

      Mock::generate('Omnilog_model', get_class($this) .'_mock_model');

      $this->EE->omnilog_model = $this->_get_mock('model');
      $this->_model   = $this->EE->omnilog_model;
      $this->_subject = new Omnilog_mcp();
  }


  public function test__log__works_with_no_previous_page_and_next_page()
  {
    $log_entries  = array('a', 'b', 'c');
    $log_limit    = 50;
    $page_title   = 'Example Page Title';
    $webmaster    = '<EMAIL>';

    $this->EE->input->expectOnce('get', array('start'));
    $this->EE->input->setReturnValue('get', FALSE, array('start'));

    $this->_model->expectOnce('get_default_log_limit');
    $this->_model->setReturnValue('get_default_log_limit', $log_limit);
<commit_msg>Tidy up formatting.<commit_after><?php if ( ! defined('BASEPATH')) exit('Invalid file request.');

/**
 * OmniLog module control panel tests.
 *
 * @author          <NAME> (http://github.com/experience/)
 * @copyright       Experience Internet
 * @package         Omnilog
 */

require_once dirname(__FILE__) .'/../mcp.omnilog.php';
require_once dirname(__FILE__) .'/../classes/omnilog_entry.php';
require_once dirname(__FILE__) .'/../models/omnilog_model.php';

class Test_omnilog_mcp extends Testee_unit_test_case {

  private $_model;
  private $_subject;


  /* --------------------------------------------------------------
   * PUBLIC METHODS
   * ------------------------------------------------------------ */
  
  /**
   * Constructor.
   *
   * @access  public
   * @return  void
   */
  public function setUp()
  {
    parent::setUp();

    Mock::generate('Omnilog_model', get_class($this) .'_mock_model');

    $this->EE->omnilog_model = $this->_get_mock('model');
    $this->_model   = $this->EE->omnilog_model;
    $this->_subject = new Omnilog_mcp();
  }


  public function test__log__works_with_no_previous_page_and_next_page()
  {
    $log_entries  = array('a', 'b', 'c');
    $log_limit    = 50;
    $page_title   = 'Example Page Title';
    $webmaster    = '<EMAIL>';

    $this->EE->input->expectOnce('get', array('start'));
    $this->EE->input->setReturnValue('get', FALSE, array('start'));

    $this->_model->expectOnce('get_default_log_limit');
    $this->_model->setReturnValue('get_default_log_limit', $log_limit);

{'fraction_non_alphanumeric': 0.23672279792746115, 'fraction_numerical': 0.0012953367875647669, 'mean_word_length': 2.494343891402715, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 41, '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': '6532575', 'n_tokens_mistral': 999, 'n_tokens_neox': 971, 'n_words': 162}