#1229 - code style fixes (alignment/spacing)
This commit is contained in:
parent
baeab5d4f4
commit
1f67218dc5
3 changed files with 128 additions and 113 deletions
|
@ -186,11 +186,12 @@ class AssociationBuilder
|
|||
/**
|
||||
* Sets field as primary key.
|
||||
*
|
||||
* @return AssociationBuilder
|
||||
* @return self
|
||||
*/
|
||||
public function isPrimaryKey()
|
||||
{
|
||||
$this->mapping['id'] = true;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
|
@ -335,7 +335,9 @@ class ClassMetadataBuilderTest extends \Doctrine\Tests\OrmTestCase
|
|||
public function testCreateManyToOneWithIdentity()
|
||||
{
|
||||
$this->assertIsFluent(
|
||||
$this->builder->createManyToOne('groups', 'Doctrine\Tests\Models\CMS\CmsGroup')
|
||||
$this
|
||||
->builder
|
||||
->createManyToOne('groups', 'Doctrine\Tests\Models\CMS\CmsGroup')
|
||||
->addJoinColumn('group_id', 'id', true, false, 'CASCADE')
|
||||
->cascadeAll()
|
||||
->fetchExtraLazy()
|
||||
|
@ -343,7 +345,9 @@ class ClassMetadataBuilderTest extends \Doctrine\Tests\OrmTestCase
|
|||
->build()
|
||||
);
|
||||
|
||||
$this->assertEquals(array('groups' => array (
|
||||
$this->assertEquals(
|
||||
array(
|
||||
'groups' => array(
|
||||
'fieldName' => 'groups',
|
||||
'targetEntity' => 'Doctrine\\Tests\\Models\\CMS\\CmsGroup',
|
||||
'cascade' => array(
|
||||
|
@ -390,7 +394,9 @@ class ClassMetadataBuilderTest extends \Doctrine\Tests\OrmTestCase
|
|||
'orphanRemoval' => false,
|
||||
'id' => true
|
||||
),
|
||||
), $this->cm->associationMappings);
|
||||
),
|
||||
$this->cm->associationMappings
|
||||
);
|
||||
}
|
||||
|
||||
public function testCreateOneToOne()
|
||||
|
@ -455,7 +461,9 @@ class ClassMetadataBuilderTest extends \Doctrine\Tests\OrmTestCase
|
|||
public function testCreateOneToOneWithIdentity()
|
||||
{
|
||||
$this->assertIsFluent(
|
||||
$this->builder->createOneToOne('groups', 'Doctrine\Tests\Models\CMS\CmsGroup')
|
||||
$this
|
||||
->builder
|
||||
->createOneToOne('groups', 'Doctrine\Tests\Models\CMS\CmsGroup')
|
||||
->addJoinColumn('group_id', 'id', true, false, 'CASCADE')
|
||||
->cascadeAll()
|
||||
->fetchExtraLazy()
|
||||
|
@ -463,7 +471,9 @@ class ClassMetadataBuilderTest extends \Doctrine\Tests\OrmTestCase
|
|||
->build()
|
||||
);
|
||||
|
||||
$this->assertEquals(array('groups' => array (
|
||||
$this->assertEquals(
|
||||
array(
|
||||
'groups' => array(
|
||||
'fieldName' => 'groups',
|
||||
'targetEntity' => 'Doctrine\\Tests\\Models\\CMS\\CmsGroup',
|
||||
'cascade' => array(
|
||||
|
@ -510,14 +520,18 @@ class ClassMetadataBuilderTest extends \Doctrine\Tests\OrmTestCase
|
|||
),
|
||||
'orphanRemoval' => false
|
||||
),
|
||||
), $this->cm->associationMappings);
|
||||
),
|
||||
$this->cm->associationMappings
|
||||
);
|
||||
}
|
||||
|
||||
public function testThrowsExceptionOnCreateOneToOneWithIdentityOnInverseSide()
|
||||
{
|
||||
$this->setExpectedException('Doctrine\ORM\Mapping\MappingException');
|
||||
|
||||
$this->builder->createOneToOne('groups', 'Doctrine\Tests\Models\CMS\CmsGroup')
|
||||
$this
|
||||
->builder
|
||||
->createOneToOne('groups', 'Doctrine\Tests\Models\CMS\CmsGroup')
|
||||
->mappedBy('test')
|
||||
->fetchExtraLazy()
|
||||
->isPrimaryKey()
|
||||
|
|
Loading…
Add table
Reference in a new issue