Skip to content

Commit

Permalink
Fix failing test, find('first') now returns empty array when no recor…
Browse files Browse the repository at this point in the history
…d was found
  • Loading branch information
ceeram committed Oct 26, 2012
1 parent a0665fe commit 39dcb80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Console/Command/AclShellTest.php
Expand Up @@ -177,7 +177,7 @@ public function testDelete() {

$Aro = ClassRegistry::init('Aro');
$result = $Aro->findById(3);
$this->assertFalse($result);
$this->assertEmpty($result);

This comment has been minimized.

Copy link
@bar

bar Oct 26, 2012

Contributor

I think it should be $this->assertEquals(array(), $result); to be more strict and test for an empty array.

This comment has been minimized.

Copy link
@ceeram

ceeram via email Oct 26, 2012

Author Contributor

This comment has been minimized.

Copy link
@ceeram

ceeram Oct 26, 2012

Author Contributor

Changed to assertSame() now, as assertEquals does not check type

This comment has been minimized.

Copy link
@bar

bar Oct 26, 2012

Contributor

We should do the same with the ones in the original commit https://github.com/cakephp/cakephp/commits/

This comment has been minimized.

Copy link
@ceeram

ceeram via email Oct 26, 2012

Author Contributor

This comment has been minimized.

Copy link
@bar

bar Oct 26, 2012

Contributor

Perfect! #922

}

/**
Expand Down

0 comments on commit 39dcb80

Please sign in to comment.