<commit_before><?php

use Doctrine\Tests\Models\DDC3699\DDC3699Parent;
use Doctrine\Tests\Models\DDC3699\DDC3699RelationOne;
use Doctrine\Tests\Models\DDC3699\DDC3699RelationMany;
use Doctrine\Tests\Models\DDC3699\DDC3699Child;

/**
 * @group DDC-3699
 */
class DDC3597Test extends \Doctrine\Tests\OrmFunctionalTestCase
{
    protected function setUp()
    {
        parent::setUp();

        try {
            $this->_schemaTool->createSchema(array(
                $this->_em->getClassMetadata(DDC3699Parent::CLASSNAME),
                $this->_em->getClassMetadata(DDC3699RelationOne::CLASSNAME),
                $this->_em->getClassMetadata(DDC3699RelationMany::CLASSNAME),
                $this->_em->getClassMetadata(DDC3699Child::CLASSNAME),
            ));
        } catch (\Exception $e) {
            // should throw error on second because schema is already created
        }
    }

    /**
     * @group DDC-3699
     */
    public function testMergingParentClassFieldsDoesNotStopMergingScalarFieldsForToOneUninitializedAssociations()<commit_msg>DDC-3699 - #1387 - catching specific exceptions<commit_after><?php

use Doctrine\DBAL\Schema\SchemaException;
use Doctrine\Tests\Models\DDC3699\DDC3699Parent;
use Doctrine\Tests\Models\DDC3699\DDC3699RelationOne;
use Doctrine\Tests\Models\DDC3699\DDC3699RelationMany;
use Doctrine\Tests\Models\DDC3699\DDC3699Child;

/**
 * @group DDC-3699
 */
class DDC3597Test extends \Doctrine\Tests\OrmFunctionalTestCase
{
    protected function setUp()
    {
        parent::setUp();

        try {
            $this->_schemaTool->createSchema(array(
                $this->_em->getClassMetadata(DDC3699Parent::CLASSNAME),
                $this->_em->getClassMetadata(DDC3699RelationOne::CLASSNAME),
                $this->_em->getClassMetadata(DDC3699RelationMany::CLASSNAME),
                $this->_em->getClassMetadata(DDC3699Child::CLASSNAME),
            ));
        } catch (SchemaException $e) {
            // should throw error on second because schema is already created
        }
    }

    /**
     * @group DDC-3699
     */
    public function testMergingParentClassFieldsDoesNotStopMergingScalarFieldsForToOneUninitializedAssociations()
{'fraction_non_alphanumeric': 0.10878470641784252, 'fraction_numerical': 0.05826126536185708, 'mean_word_length': 3.0703703703703704, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '5710186', 'n_tokens_mistral': 735, 'n_tokens_neox': 674, 'n_words': 91}