<commit_before><?php
namespace Ivory\Connection;

use Ivory\Exception\StatementException;
use Ivory\Relation\QueryRelation;
use Ivory\Result\SqlState;

class StatementExecutionTest extends \Ivory\IvoryTestCase
{
    public function testQueryError()
    {
        $conn = $this->getIvoryConnection();
        $rel = new QueryRelation($conn, 'select log(-10)');
        try {
            $rel->value();
            $this->fail('Error expected');
        }
        catch (StatementException $e) {
            $this->assertSame(SqlState::INVALID_ARGUMENT_FOR_LOGARITHM, $e->getSqlStateCode());
            $this->assertSame('ERROR', $e->getSeverity());
        }
    }
}<commit_msg>fix a unit test - error severity might be a localized string, do not test it<commit_after><?php
namespace Ivory\Connection;

use Ivory\Exception\StatementException;
use Ivory\Relation\QueryRelation;
use Ivory\Result\SqlState;

class StatementExecutionTest extends \Ivory\IvoryTestCase
{
    public function testQueryError()
    {
        $conn = $this->getIvoryConnection();
        $rel = new QueryRelation($conn, 'select log(-10)');
        try {
            $rel->value();
            $this->fail('Error expected');
        }
        catch (StatementException $e) {
            $this->assertSame(SqlState::INVALID_ARGUMENT_FOR_LOGARITHM, $e->getSqlStateCode());
        }
    }
}
{'fraction_non_alphanumeric': 0.12794117647058822, 'fraction_numerical': 0.0029411764705882353, 'mean_word_length': 2.9912023460410557, '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': '3430753', 'n_tokens_mistral': 407, 'n_tokens_neox': 403, 'n_words': 80}