/** * Tests that just accessing the translation will mark the property as dirty, this * is to facilitate the saving process by not having to remember to mark the property * manually * * @return void */ public function testTranslationDirty() { $entity = new TestEntity(); $entity->set('_translations', ['eng' => new Entity(['title' => 'My Title']), 'spa' => new Entity(['title' => 'Titulo'])]); $entity->clean(); $this->assertEquals('My Title', $entity->translation('eng')->get('title')); $this->assertTrue($entity->dirty('_translations')); }