aboutsummaryrefslogtreecommitdiff
path: root/tests/Utilities/GetCreditEntityUtility.php
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2020-07-17 14:48:46 +0300
committerValentin Popov <info@valentineus.link>2020-07-17 14:48:46 +0300
commitf01649b2e18c662a63a38315e8e403fdb2db5a4d (patch)
treebae1cc35de174e6dddc44c146974156c52a94b23 /tests/Utilities/GetCreditEntityUtility.php
parent6d354e6a7791026b4a45e5e20963b10ed1a8bfbe (diff)
downloadphp-epg-service-f01649b2e18c662a63a38315e8e403fdb2db5a4d.tar.xz
php-epg-service-f01649b2e18c662a63a38315e8e403fdb2db5a4d.zip
Added get credit entity utility
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to 'tests/Utilities/GetCreditEntityUtility.php')
-rw-r--r--tests/Utilities/GetCreditEntityUtility.php39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/Utilities/GetCreditEntityUtility.php b/tests/Utilities/GetCreditEntityUtility.php
new file mode 100644
index 0000000..f46b176
--- /dev/null
+++ b/tests/Utilities/GetCreditEntityUtility.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Copyright 2020 “EPGService”
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an “AS IS” BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+declare(strict_types = 1);
+
+namespace Tests\Utilities;
+
+use EPGService\Entities\Program\CreditEntity;
+use Faker\Factory as Faker;
+
+/**
+ * @copyright Copyright © 2020 “Valentin Popov” <info@valentineus.link>
+ * @license http://www.apache.org/licenses/LICENSE-2.0
+ * @package Tests\Utilities
+ */
+final class GetCreditEntityUtility {
+ public static function get(): CreditEntity {
+ $faker = Faker::create();
+
+ return CreditEntity::create([
+ 'name' => $faker->unique()->sha256,
+ 'type' => $faker->unique()->sha256,
+ ]);
+ }
+}