/** * StringBehaviorTest::testMultipleFieldsAndMultipleFilters() * * @return void */ public function testMultipleFieldsAndMultipleFilters() { $this->Comments->behaviors()->String->config(['fields' => ['title', 'comment'], 'input' => ['strtolower', 'ucwords']]); $data = ['comment' => 'blaBla', 'url' => 'www.dereuromark.de', 'title' => 'some nAme']; $entity = $this->Comments->newEntity($data); $res = $this->Comments->save($entity); $this->assertTrue((bool) $res); $this->assertSame('Some Name', $res['title']); $this->assertSame('Blabla', $res['comment']); }