<commit_before><?php

namespace Acquia\Test\Common;

use Acquia\Common\Json;


class JsonTest extends \PHPUnit_Framework_TestCase
{
    protected function getTestJson() {
        $test_file = dirname(__FILE__) . "/.JsonTestArray.json";
        return file_get_contents($test_file);
    }

    protected function getTestArray() {
        $test_file = dirname(__FILE__) . "/.JsonTestArray.php";
        return eval('return ' . file_get_contents($test_file) . ';');
    }

    public function testJsonEncode()
    {
       $this->assertEquals(Json::encode($this->getTestArray()),$this->getTestJson());
    }

    public function testJsonDecode()
    {
        $this->assertEquals(Json::decode($this->getTestJson()),$this->getTestArray());
    }
}
<commit_msg>Fixes order of arguments in assertEquals(expected, actual)<commit_after><?php

namespace Acquia\Test\Common;

use Acquia\Common\Json;


class JsonTest extends \PHPUnit_Framework_TestCase
{
    protected function getTestJson() {
        $test_file = dirname(__FILE__) . "/.JsonTestArray.json";
        return file_get_contents($test_file);
    }

    protected function getTestArray() {
        $test_file = dirname(__FILE__) . "/.JsonTestArray.php";
        return eval('return ' . file_get_contents($test_file) . ';');
    }

    public function testJsonEncode()
    {
       $this->assertEquals($this->getTestJson(), Json::encode($this->getTestArray()));
    }

    public function testJsonDecode()
    {
        $this->assertEquals($this->getTestArray(), Json::decode($this->getTestJson()));
    }
}

{'fraction_non_alphanumeric': 0.14432328415651058, 'fraction_numerical': 0.0, 'mean_word_length': 3.5481049562682214, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '2254690', 'n_tokens_mistral': 470, 'n_tokens_neox': 462, 'n_words': 76}