<commit_before><?php
use Mojopollo\Helpers\String;

class DateTimeTest extends \PHPUnit_Framework_TestCase
{
  /**
   * DateTime class object
   *
   * @var DateTime
   */
  protected $dateTime;

  /**
   * This will run at the beginning of every test method
   */
  public function setUp()
  {
    // Parent setup
    parent::SetUp();

    // Set string class
    $this->dateTime = new DateTime;
  }

  /**
   * This will run at the end of every test method
   */
  public function tearDown()
  {
    // Parent teardown
    parent::tearDown();

    // Unset GoogleApisHelper class
    $this->dateTime = null;
  }

  /**
   * Test that only the first match is replaced and not subsequent others
   *
   * @return void
   */
  public function testReplaceFirstMatch()
  {
    // Original sentence
    $original = 'mojo is a pollo and mojo';

    // Replace "mojo" with "jojo"
    $result = $this->string->replaceFirstMatch('mojo', 'jojo', $original);

    // Expected modified sentence
    $expected = 'jojo is a pollo and mojo';

    // Test
    $this->assertEquals($result, $expected);
  }

}
<commit_msg>fixes issue with date time test not being setup correctly<commit_after><?php
use Mojopollo\Helpers\String;

class DateTimeTest extends \PHPUnit_Framework_TestCase
{
  /**
   * DateTime class object
   *
   * @var DateTime
   */
  protected $dateTime;

  /**
   * This will run at the beginning of every test method
   */
  public function setUp()
  {
    // Parent setup
    parent::SetUp();

    // Set timezone to UTC
    date_default_timezone_set('UTC');

    // Set string class
    $this->dateTime = new DateTime;
  }

  /**
   * This will run at the end of every test method
   */
  public function tearDown()
  {
    // Parent teardown
    parent::tearDown();

    // Unset GoogleApisHelper class
    $this->dateTime = null;
  }

  /**
   * Temp placeholder
   *
   * @return void
   */
  public function testInitial()
  {
    // Test
    $this->assertTrue(true);
  }

}

{'fraction_non_alphanumeric': 0.11548159354513364, 'fraction_numerical': 0.0, 'mean_word_length': 2.480701754385965, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '3791271', 'n_tokens_mistral': 625, 'n_tokens_neox': 614, 'n_words': 184}