<commit_before><?php
/*
 * This file is part of the Gea package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * This file incorporates work covered by the following copyright and
 * permission notices:
 *
 *   Dotenv is (c) 2013 <NAME> - <EMAIL> - http://www.vancelucas.com
 *   Dotenv is released under BSD 3-Clause License
 */

namespace Gea\Tests\Compatibility;

use Gea\Gea;
use Gea\Tests\TestCase;

/**
 * This file runs most of the tests used by Dotenv, using same fixtures, to ensure results
 * are the same.
 *
 * @author  <NAME> <<EMAIL>>
 * @license http://opensource.org/licenses/MIT MIT
 * @package Gea
 * @coversNothing
 */
class GeaTest extends TestCase
{
    /**
     * @var string
     */
    protected $path;

    /**
     * @var \Gea\Gea
     */
    protected $gea;

    protected function setUp()
    {
        parent::setUp();
        $this->path = getenv('GEA_TESTS_FIXTURES_PATH');
    }

    protected function tearDown()
    {
        $this->gea->flush(Gea::FLUSH_HARD);
        unset($this->gea);
        parent::tearDown();
    }

    protected function buildGea($file = '.env')
    {
        $this->gea = Gea::instance($this->path, $file, Gea::VAR_NAMES_HOLD);

        return $this->gea;
    }

    public function testGeaLoadsEnvironmentVars()<commit_msg>Fix test accessing nonexistent object<commit_after><?php
/*
 * This file is part of the Gea package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * This file incorporates work covered by the following copyright and
 * permission notices:
 *
 *   Dotenv is (c) 2013 <NAME> - <EMAIL> - http://www.vancelucas.com
 *   Dotenv is released under BSD 3-Clause License
 */

namespace Gea\Tests\Compatibility;

use Gea\Gea;
use Gea\Tests\TestCase;

/**
 * This file runs most of the tests used by Dotenv, using same fixtures, to ensure results
 * are the same.
 *
 * @author  <NAME> <<EMAIL>>
 * @license http://opensource.org/licenses/MIT MIT
 * @package Gea
 * @coversNothing
 */
class GeaTest extends TestCase
{
    /**
     * @var string
     */
    protected $path;

    /**
     * @var \Gea\Gea
     */
    protected $gea;

    protected function setUp()
    {
        parent::setUp();
        $this->path = getenv('GEA_TESTS_FIXTURES_PATH');
    }

    protected function tearDown()
    {
        if ($this->gea) {
            $this->gea->flush(Gea::FLUSH_HARD);
            unset($this->gea);
        }
        parent::tearDown();
    }

    protected function buildGea($file = '.env')
    {
        $this->gea = Gea::instance($this->path, $file, Gea::VAR_NAMES_HOLD);

        return $this->gea;
    }

    public function testGeaLoadsEnvironmentVars()
{'fraction_non_alphanumeric': 0.12935843793584378, 'fraction_numerical': 0.003486750348675035, 'mean_word_length': 2.678205128205128, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 34, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '652966', 'n_tokens_mistral': 947, 'n_tokens_neox': 916, 'n_words': 261}