Skip to content

Commit

Permalink
Fixing some refactoring artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Mar 17, 2014
1 parent 8bb695d commit 7cb08b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/ORM/Entity.php
Expand Up @@ -43,16 +43,15 @@ class Entity implements EntityInterface {
* - markClean: whether to mark all properties as clean after setting them
* - markNew: whether this instance has not yet been persisted
* - guard: whether to prevent inaccessible properties from being set (default: false)
* - source: An array containing the 'alias' and 'className' keys, describing the
* repository this entity came from.
* - source: A string representing the alias of the repository this entity came from
*/
public function __construct(array $properties = [], array $options = []) {
$options += [
'useSetters' => true,
'markClean' => false,
'markNew' => null,
'guard' => false,
'source' => []
'source' => null
];
$this->_className = get_class($this);
$this->set($properties, [
Expand Down
7 changes: 1 addition & 6 deletions tests/TestCase/ORM/TableTest.php
Expand Up @@ -2815,12 +2815,7 @@ public function testLinkBelongsToMany() {
$table = TableRegistry::get('articles');
$table->belongsToMany('tags');
$tagsTable = TableRegistry::get('tags');
$source = [
'source' => [
'alias' => 'tags',
'className' => 'TestApp\Model\Table\TagsTable'
]
];
$source = ['source' => 'tags'];
$options = ['markNew' => false];

$article = new \Cake\ORM\Entity([
Expand Down

0 comments on commit 7cb08b0

Please sign in to comment.