From 5ba704abceb11f6e0bb3646492809a323a8fa19d Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sun, 19 Jul 2020 19:16:47 +0400 Subject: Added country entity Signed-off-by: Valentin Popov --- tests/Entities/CountryEntityTest.php | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 tests/Entities/CountryEntityTest.php (limited to 'tests/Entities/CountryEntityTest.php') diff --git a/tests/Entities/CountryEntityTest.php b/tests/Entities/CountryEntityTest.php new file mode 100644 index 0000000..dd44075 --- /dev/null +++ b/tests/Entities/CountryEntityTest.php @@ -0,0 +1,49 @@ + + * @license http://www.apache.org/licenses/LICENSE-2.0 + * @package Tests\Entities + */ +final class CountryEntityTest extends TestCase { + public function testCreateEntity(): void { + $faker = Faker::create(); + + $id = $faker->numberBetween(1, 100); + $iso = $faker->countryCode; + $lang = $faker->languageCode; + $name = $faker->unique()->sha256; + $version = $faker->unique()->sha256; + + $entity = CountryEntity::create(compact('id', 'iso', 'lang', 'name', 'version')); + + self::assertEquals($id, $entity->id); + self::assertEquals($iso, $entity->iso); + self::assertEquals($lang, $entity->lang); + self::assertEquals($name, $entity->name); + self::assertEquals($version, $entity->version); + } +} -- cgit v1.2.3