Example #1
0
 /**
  * Shim support for saving via saveField() similar to 2.x
  *
  * @return void
  */
 public function testSaveField()
 {
     $post = $this->Posts->find('first');
     $this->assertInstanceOf(Entity::class, $post);
     $res = $this->Posts->saveField($post['id'], 'title', 'FooBar');
     $this->assertTrue((bool) $res);
     $post = $this->Posts->record($post['id']);
     $this->assertEquals('FooBar', $post['title']);
 }