added tests

This commit is contained in:
AlexAlexandru 2018-07-19 21:14:18 +03:00
parent 1aa0108354
commit a58eb706dc

View file

@ -1144,6 +1144,16 @@ class TranslateBehaviorTest extends CakeTestCase {
$TestModel->bindTranslation($translations); $TestModel->bindTranslation($translations);
$result = $TestModel->find('first'); $result = $TestModel->find('first');
$TestModel->find('first', array(
'fields' => array(
'TranslatedItem.title',
),
));
$TestModel->find('first', array(
'fields' => array(
'TranslatedItem.title',
),
));
$this->assertArrayHasKey('Title', $result); $this->assertArrayHasKey('Title', $result);
$this->assertArrayHasKey('content', $result['Title'][0]); $this->assertArrayHasKey('content', $result['Title'][0]);
$this->assertArrayNotHasKey('title', $result); $this->assertArrayNotHasKey('title', $result);