Skip to content

Commit

Permalink
better separator for embedded entities
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy-j committed Jun 13, 2019
1 parent 2d071b2 commit 7aabc4a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/Schema/Relation/EmbeddedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ public function testPackSchema()
$schema['composite'][Schema::RELATIONS]['embedded'][\Cycle\ORM\Relation::LOAD]
);

$this->assertArrayHasKey('composite.embedded', $schema);
$this->assertSame('id', $schema['composite.embedded'][Schema::PRIMARY_KEY]);
$this->assertSame('default', $schema['composite.embedded'][Schema::DATABASE]);
$this->assertSame('composite', $schema['composite.embedded'][Schema::TABLE]);
$this->assertArrayHasKey('composite:embedded', $schema);
$this->assertSame('id', $schema['composite:embedded'][Schema::PRIMARY_KEY]);
$this->assertSame('default', $schema['composite:embedded'][Schema::DATABASE]);
$this->assertSame('composite', $schema['composite:embedded'][Schema::TABLE]);

$this->assertSame([
'embedded' => 'embedded_column',
'id' => 'id'
], $schema['composite.embedded'][Schema::COLUMNS]);
], $schema['composite:embedded'][Schema::COLUMNS]);
}

public function testPackSchemaLazyLoad()
Expand Down Expand Up @@ -117,15 +117,15 @@ public function testPackSchemaLazyLoad()
$schema['composite'][Schema::RELATIONS]['embedded'][\Cycle\ORM\Relation::LOAD]
);

$this->assertArrayHasKey('composite.embedded', $schema);
$this->assertSame('id', $schema['composite.embedded'][Schema::PRIMARY_KEY]);
$this->assertSame('default', $schema['composite.embedded'][Schema::DATABASE]);
$this->assertSame('composite', $schema['composite.embedded'][Schema::TABLE]);
$this->assertArrayHasKey('composite:embedded', $schema);
$this->assertSame('id', $schema['composite:embedded'][Schema::PRIMARY_KEY]);
$this->assertSame('default', $schema['composite:embedded'][Schema::DATABASE]);
$this->assertSame('composite', $schema['composite:embedded'][Schema::TABLE]);

$this->assertSame([
'embedded' => 'embedded_column',
'id' => 'id'
], $schema['composite.embedded'][Schema::COLUMNS]);
], $schema['composite:embedded'][Schema::COLUMNS]);
}

public function testRenderTable()
Expand Down

0 comments on commit 7aabc4a

Please sign in to comment.