Skip to content

Commit

Permalink
Wrap long lines and fix incorrect assertions.
Browse files Browse the repository at this point in the history
Refs #5911
  • Loading branch information
markstory committed Feb 17, 2015
1 parent db1ecc6 commit fad068d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/TestCase/ORM/AssociationTest.php
Expand Up @@ -196,10 +196,13 @@ public function testTargetPlugin()
$table = $this->association->target();
$this->assertInstanceOf('TestPlugin\Model\Table\CommentsTable', $table);

$this->assertTrue(TableRegistry::exists('TestPlugin.ThisAssociationName'), 'The association class will use this registry key');
$this->assertFalse(TableRegistry::exists('TestPlugin.Comments', 'The association clas will NOT use this key'));
$this->assertFalse(TableRegistry::exists('Comments', 'Should also not be set'));
$this->assertFalse(TableRegistry::exists('ThisAssociationName', 'Should also not be set'));

This comment has been minimized.

Copy link
@AD7six

AD7six Feb 17, 2015

Member

Heh.. that was quite a derp.

This comment has been minimized.

Copy link
@markstory

markstory Feb 17, 2015

Author Member

I went in to fix a typo, and found this too. Quite lucky.

$this->assertTrue(
TableRegistry::exists('TestPlugin.ThisAssociationName'),
'The association class will use this registry key'
);
$this->assertFalse(TableRegistry::exists('TestPlugin.Comments'), 'The association class will NOT use this key');
$this->assertFalse(TableRegistry::exists('Comments'), 'Should also not be set');
$this->assertFalse(TableRegistry::exists('ThisAssociationName'), 'Should also not be set');

$plugin = TableRegistry::get('TestPlugin.ThisAssociationName');
$this->assertSame($table, $plugin, 'Should be an instance of TestPlugin.Comments');
Expand Down

0 comments on commit fad068d

Please sign in to comment.