<commit_before><?php

use PHPUnit\Framework\TestCase;

require_once __DIR__ . '/TestApiMapper.php';
/**
 *
 */
class ApiMapperTest extends TestCase
{
    public function setup(): void
    {
        $this->pdo     = $this->getMockBuilder('PDO')
            ->disableOriginalConstructor()
            ->getMock();
        $this->request = $this->getMockBuilder('Request')
            ->disableOriginalConstructor()
            ->getMock();
    }

    public function testThatMapperInstanceHasDependencies()
    {
        $mapper = new ApiMapper($this->pdo, $this->request);

        $this->assertAttributeEquals($this->pdo, '_db', $mapper);
        $this->assertAttributeEquals($this->request, '_request', $mapper);
    }

    public function testThatApiMapperHasNoDefaultFields()
    {
        $mapper = new ApiMapper($this->pdo, $this->request);

        $this->assertEquals([], $mapper->getDefaultFields());
        $this->assertEquals([], $mapper->getVerboseFields());
    }

    public function testThatDefaultMapperReturnsNothing()
    {
        $mapper = new ApiMapper($this->pdo, $this->request);

        $result = [['a', 'b', 'c']];

        $this->assertEquals([[]], $mapper->transformResults($result, true));
        $this->assertEquals([[]], $mapper->transformResults($result, false));
        $this->assertNotEquals([], $mapper->transformResults($result, true));
        $this->assertNotEquals([], $mapper->transformResults($result, false));
    }<commit_msg>Remove test that doesn't really test anything<commit_after><?php

use PHPUnit\Framework\TestCase;

require_once __DIR__ . '/TestApiMapper.php';
/**
 *
 */
class ApiMapperTest extends TestCase
{
    public function setup(): void
    {
        $this->pdo     = $this->getMockBuilder('PDO')
            ->disableOriginalConstructor()
            ->getMock();
        $this->request = $this->getMockBuilder('Request')
            ->disableOriginalConstructor()
            ->getMock();
    }

    public function testThatApiMapperHasNoDefaultFields()
    {
        $mapper = new ApiMapper($this->pdo, $this->request);

        $this->assertEquals([], $mapper->getDefaultFields());
        $this->assertEquals([], $mapper->getVerboseFields());
    }

    public function testThatDefaultMapperReturnsNothing()
    {
        $mapper = new ApiMapper($this->pdo, $this->request);

        $result = [['a', 'b', 'c']];

        $this->assertEquals([[]], $mapper->transformResults($result, true));
        $this->assertEquals([[]], $mapper->transformResults($result, false));
        $this->assertNotEquals([], $mapper->transformResults($result, true));
        $this->assertNotEquals([], $mapper->transformResults($result, false));
    }
{'fraction_non_alphanumeric': 0.17160859896219421, 'fraction_numerical': 0.0, 'mean_word_length': 3.2106084243369737, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 57, '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': '7296114', 'n_tokens_mistral': 764, 'n_tokens_neox': 759, 'n_words': 131}