<commit_before><?php
    namespace plusql;
    use EmptySetException;

    \murphy\Test::add(function($runner)
    {
        $conn = NULL;
        \murphy\Fixture::load(dirname(__FILE__).'/../on_clause.class.php.murphy/fixture.php')->execute();
        \murphy\Fixture::load(dirname(__FILE__).'/../query_iterator.class.php.murphy/fixture.php')
        ->execute(function($aliases) use(&$conn)
        {
            $aliases = $aliases['plusql'];
            $host = $aliases[0];
            $username = $aliases[1];
            $password = $aliases[2];
            $dbname = $aliases[3];
            $conn = new Connection($host,$username,$password,$dbname);
            $conn->connect();
        });
        
        $raw = new RawQuery($conn);
        $raw->run('DELETE FROM strong_guy');
        $sel = new Select($conn);
        
        try
        {
            $sel->strong_guy->select('*')->run()->strong_guy->strong_name;
            $runner->fail('Why was an EmptySetException not thrown?');
        }
        
        catch(EmptySetException $exc)
        {
            $runner->pass();
        }
    });<commit_msg>Added test for iteration on standard query<commit_after><?php
    namespace plusql;
    use EmptySetException,Plusql;

    \murphy\Test::add(function($runner)
    {
        $conn = NULL;
        \murphy\Fixture::load(dirname(__FILE__).'/../on_clause.class.php.murphy/fixture.php')->execute();
        \murphy\Fixture::load(dirname(__FILE__).'/../query_iterator.class.php.murphy/fixture.php')
        ->execute(function($aliases) use(&$conn)
        {
            $aliases = $aliases['plusql'];
            $host = $aliases[0];
            $username = $aliases[1];
            $password = $aliases[2];
            $dbname = $aliases[3];
            $conn = new Connection($host,$username,$password,$dbname);
            $conn->connect();
        });
        
        $raw = new RawQuery($conn);
        $raw->run('DELETE FROM strong_guy');
        $sel = new Select($conn);
        
        try
        {
            $sel->strong_guy->select('*')->run()->strong_guy->strong_name;
            $runner->fail('Why was an EmptySetException not thrown?');
        }
        
        catch(EmptySetException $exc)
        {
            $runner->pass();
        }
    });

    \murphy\Test::add(function($runner)
    {
        \murphy\Fixture::load(dirname(__FILE__).'/../on_clause.class.php.murphy/fixture.php')->execute();
        \murphy\Fixture::load(dirname(__FILE__).'/../query_iterator.class.php.murphy/fixture.php')
        ->execute(function($aliases) use(&$conn)
        {
            $aliases = $aliases['plusql'];
            $host = $aliases[0];
            $username = $aliases[1];
            $password = $aliases[2];
            $dbname = $aliases[3];
            $conn = new Connection($host,$username,$password,$dbname);
            $conn->connect();
        });
        
        Plusql::credentials('live',array('localhost','plusql','plusql','plusql'));

        if(Plusql::against('live')->run('SELECT * FROM weak_guy')->weak_guy->weak_name != 'Weaky Weakling')
            $runner->fail('Unable to get the correct result from a raw query');
        else
            $runner->pass();
    });
{'fraction_non_alphanumeric': 0.17461300309597524, 'fraction_numerical': 0.0037151702786377707, 'mean_word_length': 2.0509915014164304, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, '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': '7047717', 'n_tokens_mistral': 1000, 'n_tokens_neox': 962, 'n_words': 135}