<commit_before>#!/usr/bin/env php
<?php

// Test Driver
//
//

function readtestdata($filename) {
    $state = '';
    $fd = open($filename);
    if ($line == '--TEST--' || $line == '--INPUT--' || $line == '--EXPECTED--') {
        $state = $line;
    } else if ($state != '') {
        $info[$state] += $line + "\n";
    }

    return array(
        trim($info['--TEST--']),
        trim($info['--INPUT--']),
        trim($info['--EXPECTED--'])
    );
}

function runtest($testname, $flag, $sqli_flags) {

}

function test_tokens() {

}

function test_tokens_mysql() {

}

function test_folding() {

}

function test_fingerprints() {

}<commit_msg>closer to working php tests<commit_after>#!/usr/bin/env php
<?php

// Test Driver
//
//

function readtestdata($filename) {
    $state = '';
    $fd = open($filename);
    if ($line == '--TEST--' || $line == '--INPUT--' || $line == '--EXPECTED--') {
        $state = $line;
    } else if ($state != '') {
        $info[$state] += $line + "\n";
    }

    return array(
        trim($info['--TEST--']),
        trim($info['--INPUT--']),
        trim($info['--EXPECTED--'])
    );
}

function fileproviders($pattern) {
    $args = array();
    foreach (glob($pattern) as $a) {
        array_push($args, array($a));
    }
    return $args;
}

function runtest($testname, $flag, $sqli_flags) {

}

class LibinjectionTestTokens extends PHPUnit_Framework_TestCase
{
    /**
     * @dataProvider filesTokens
     */
    public function testTokens($a) {
        True;
    }
    public function filesTokens() {
        return fileproviders('../tests/test-tokens-*.txt');
    }

    /**
     * @dataProvider filesFolding
     */
    public function testFolding($a) {
        return True;
    }
    public function filesFolding() {
        return fileproviders('../tests/test-folding-*.txt');
    }

    /**
     * @dataProvider filesFingerprints
     */
    public function testFingerprints($a) {
        return True;
    }
    public function filesFingerprints() {
        return fileproviders('../tests/test-sqli-*.txt');
    }
}
{'fraction_non_alphanumeric': 0.2, 'fraction_numerical': 0.0, 'mean_word_length': 2.282091917591125, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '3468743', 'n_tokens_mistral': 694, 'n_tokens_neox': 689, 'n_words': 131}