<commit_before><?php

namespace Doctrine\Tests\DBAL\Schema;

use Doctrine\DBAL\Schema\Sequence;
use Doctrine\DBAL\Schema\Table;

class SequenceTest extends \Doctrine\Tests\DbalTestCase
{
    /**
     * @group DDC-1657
     */
    public function testIsAutoincrementFor()
    {
        $table = new Table("foo");
        $table->addColumn("id", "integer", array("autoincrement" => true));
        $table->setPrimaryKey(array("id"));

        $sequence = new Sequence("foo_id_seq");
        $sequence2 = new Sequence("bar_id_seq");
        $sequence3 = new Sequence("other.foo_id_seq");

        $this->assertTrue($sequence->isAutoIncrementsFor($table));
        $this->assertFalse($sequence2->isAutoIncrementsFor($table));
        $this->assertFalse($sequence3->isAutoIncrementsFor($table));
    }
}

<commit_msg>Proof of 2714<commit_after><?php

namespace Doctrine\Tests\DBAL\Schema;

use Doctrine\DBAL\Schema\Sequence;
use Doctrine\DBAL\Schema\Table;

class SequenceTest extends \Doctrine\Tests\DbalTestCase
{
    /**
     * @group DDC-1657
     */
    public function testIsAutoincrementFor()
    {
        $table = new Table("foo");
        $table->addColumn("id", "integer", array("autoincrement" => true));
        $table->setPrimaryKey(array("id"));

        $sequence = new Sequence("foo_id_seq");
        $sequence2 = new Sequence("bar_id_seq");
        $sequence3 = new Sequence("other.foo_id_seq");

        $this->assertTrue($sequence->isAutoIncrementsFor($table));
        $this->assertFalse($sequence2->isAutoIncrementsFor($table));
        $this->assertFalse($sequence3->isAutoIncrementsFor($table));
    }

    public function testIsAutoincrementForCaseInsensitive()
    {
        $table = new Table('foo');
        $table->addColumn('ID', 'integer', array('autoincrement' => true));
        $table->setPrimaryKey(array('ID'));

        $sequence = new Sequence("foo_id_seq");
        $sequence1 = new Sequence("foo_ID_seq");
        $sequence2 = new Sequence("bar_id_seq");
        $sequence3 = new Sequence("bar_ID_seq");
        $sequence4 = new Sequence("other.foo_id_seq");

        $this->assertTrue($sequence->isAutoIncrementsFor($table));
        $this->assertTrue($sequence1->isAutoIncrementsFor($table));
        $this->assertFalse($sequence2->isAutoIncrementsFor($table));
        $this->assertFalse($sequence3->isAutoIncrementsFor($table));
        $this->assertFalse($sequence4->isAutoIncrementsFor($table));
    }
}


{'fraction_non_alphanumeric': 0.1590351594439902, 'fraction_numerical': 0.011447260834014717, 'mean_word_length': 3.6432637571157493, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 34, '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': '1882093', 'n_tokens_mistral': 769, 'n_tokens_neox': 735, 'n_words': 105}