Skip to content
Permalink
Browse files

Improving tests for BelongsTo

  • Loading branch information...
lorenzo committed May 12, 2013
1 parent e4c8668 commit a778589c25a4438959ec87c2c59ac598e7a4884f
@@ -80,7 +80,7 @@ public function attachTo(Query $query, array $options = []) {
if (!empty($options['foreignKey'])) {
$options['conditions'][] = sprintf('%s.%s = %s.%s',
$target->alias(),
$source->primaryKey(),
$target->primaryKey(),
$source->alias(),
$options['foreignKey']
);
@@ -96,7 +96,7 @@ public function testAttachTo() {
/**
* Tests that default config defined in the association can be overridden
*
*
* @return void
*/
public function testAttachToConfigOverride() {
@@ -132,7 +132,6 @@ public function testAttachToConfigOverride() {
public function testAttachToNoFields() {
$query = $this->getMock('\Cake\ORM\Query', ['join', 'select'], [null]);
$config = [
'foreignKey' => 'company_id',
'sourceTable' => $this->client,
'targetTable' => $this->company,
'conditions' => ['Company.is_active' => true]

0 comments on commit a778589

Please sign in to comment.
You can’t perform that action at this time.