Skip to content
Permalink
Browse files

#8671 Adding documentation and another assert.

  • Loading branch information...
burzum committed Apr 26, 2016
1 parent 1130d27 commit 85bd4edc0ea9d8483738ff05bc55b69e08c1a9ec
Showing with 4 additions and 1 deletion.
  1. +3 −1 src/ORM/Table.php
  2. +1 −0 tests/TestCase/ORM/TableTest.php
@@ -1213,7 +1213,9 @@ public function get($primaryKey, $options = [])
* called allowing you to define additional default values. The new
* entity will be saved and returned.
*
* @param array|\Cake\ORM\Query $search The criteria to find existing records by.
* @param array|\Cake\ORM\Query $search The criteria to find existing
* records by. Note that when you pass a query object you'll have to use
* the 2nd arg of the method to modify the entity data before saving.
* @param callable|null $callback A callback that will be invoked for newly
* created entities. This callback will be called *before* the entity
* is persisted.
@@ -5388,6 +5388,7 @@ function ($article) {
$article = $articles->findOrCreate($query);
$this->assertEquals('First Article', $article->title);
$this->assertEquals(2, $article->author_id);
$this->assertFalse($article->isNew());
}
/**

0 comments on commit 85bd4ed

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