From e4bef9976d240312c77c772f195dfaf604193762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boris=20Mom=C4=8Dilovi=C4=87?= Date: Wed, 11 Jun 2014 01:32:12 +0200 Subject: [PATCH] Entity: User: added `gender` and `locale` properties --- src/Entity/User.php | 10 ++++++++++ test/src/Entity/UserTest.php | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Entity/User.php b/src/Entity/User.php index ce06d6f..77cc0ff 100644 --- a/src/Entity/User.php +++ b/src/Entity/User.php @@ -14,6 +14,8 @@ class User protected $description; protected $imageUrl; protected $urls; + protected $gender; + protected $locale; public function __get($name) { @@ -61,6 +63,8 @@ class User 'description' => $this->description, 'imageUrl' => $this->imageUrl, 'urls' => $this->urls, + 'gender' => $this->gender, + 'locale' => $this->locale, ); } @@ -99,6 +103,12 @@ class User case 'urls': $this->urls = $value; break; + case 'gender': + $this->gender = $value; + break; + case 'locale': + $this->locale = $value; + break; } } diff --git a/test/src/Entity/UserTest.php b/test/src/Entity/UserTest.php index 99af841..302537a 100644 --- a/test/src/Entity/UserTest.php +++ b/test/src/Entity/UserTest.php @@ -24,7 +24,9 @@ class UserTest extends \PHPUnit_Framework_TestCase 'location' => 'mock_location', 'description' => 'mock_description', 'imageUrl' => 'mock_imageUrl', - 'urls' => 'mock_urls' + 'urls' => 'mock_urls', + 'gender' => 'mock_gender', + 'locale' => 'mock_locale' ); }