diff --git a/src/Ushahidi/Core/Entity/Post.php b/src/Ushahidi/Core/Entity/Post.php index 25df61eabe..e5857f2fd1 100644 --- a/src/Ushahidi/Core/Entity/Post.php +++ b/src/Ushahidi/Core/Entity/Post.php @@ -52,7 +52,8 @@ class Post extends StaticEntity protected $metadata; protected $data_source_message_id; - + + protected $base_language; // StatefulData protected function getDefaultData() { @@ -115,6 +116,7 @@ protected function getDefinition() 'lock' => 'array', 'source' => 'string', 'metadata' => '*json', + 'base_language' => 'string', 'data_source_message_id' => 'string' ]; } diff --git a/tests/Unit/Modules/V3/Repository/PostRepositoryTest.php b/tests/Unit/Modules/V3/Repository/PostRepositoryTest.php index 3f4cdd604a..f3340623c0 100644 --- a/tests/Unit/Modules/V3/Repository/PostRepositoryTest.php +++ b/tests/Unit/Modules/V3/Repository/PostRepositoryTest.php @@ -69,6 +69,7 @@ public function testCreateMany() 'type' => 'report', 'status' => 'published', 'locale' => 'en_US', + 'base_language' => 'en_US', 'values' => [ 'test-location' => [[ 'lat' => 1, @@ -84,6 +85,7 @@ public function testCreateMany() 'type' => 'report', 'status' => 'published', 'locale' => 'en_US', + 'base_language' => 'en_US', 'values' => [ 'test-location' => [[ 'lat' => 2, @@ -99,6 +101,7 @@ public function testCreateMany() 'type' => 'report', 'status' => 'published', 'locale' => 'en_US', + 'base_language' => 'en_US', 'values' => [ 'test-location' => [[ 'lat' => 7, @@ -185,6 +188,7 @@ public function testCreateManyWithMedia() 'type' => 'report', 'status' => 'published', 'locale' => 'en_US', + 'base_language' => 'en_US', 'values' => [ 'test-location' => [[ 'lat' => 1, @@ -207,6 +211,7 @@ public function testCreateManyWithMedia() 'type' => 'report', 'status' => 'published', 'locale' => 'en_US', + 'base_language' => 'en_US', 'values' => [ 'test-location' => [[ 'lat' => 2,