Skip to content

Commit

Permalink
Adding more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Oct 17, 2013
1 parent ad3ff15 commit 002850e
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions Cake/Test/TestCase/ORM/EntityTest.php
Expand Up @@ -395,8 +395,21 @@ public function testMethodCache() {
$entity->expects($this->once())->method('getBar');
$entity2->expects($this->once())->method('setBar');

$entity->setFoo(1);
$entity->getBar();
$entity2->setBar(1);
$entity->set('foo', 1);
$entity->get('bar');
$entity2->set('bar', 1);
}

/**
* Tests that long properties in the entity are inflected correctly
*
* @return void
*/
public function testSetGetLongProperyNames() {
$entity = $this->getMock('\Cake\ORM\Entity', ['getVeryLongProperty', 'setVeryLongProperty']);
$entity->expects($this->once())->method('getVeryLongProperty');
$entity->expects($this->once())->method('setVeryLongProperty');
$entity->get('very_long_property');
$entity->set('very_long_property', 1);
}
}

0 comments on commit 002850e

Please sign in to comment.