Code Duplication    Length = 15-18 lines in 2 locations

tests/FwlibTest/Web/AbstractViewWithCacheTest.php 1 location

@@ 61-75 (lines=15) @@
58
    }
59
60
61
    public static function setUpBeforeClass()
62
    {
63
        $utilContainer = UtilContainer::getInstance();
64
        self::$envUtilBackup = $utilContainer->getEnv();
65
66
        $testCase = new self;
67
        $envUtil = $testCase->getMock(EnvUtil::class, ['getServer']);
68
        $envUtil->expects($testCase->any())
69
            ->method('getServer')
70
            ->willReturnCallback(function() {
71
                return self::$requestUri;
72
            });
73
74
        $utilContainer->register('Env', $envUtil);
75
    }
76
77
78
    public static function tearDownAfterClass()

tests/FwlibTest/Web/RequestTraitTest.php 1 location

@@ 46-63 (lines=18) @@
43
    }
44
45
46
    public static function setUpBeforeClass()
47
    {
48
        $utilContainer = UtilContainer::getInstance();
49
        self::$httpUtilBackup = $utilContainer->getHttp();
50
51
        $testCase = new self;
52
        $httpUtil = $testCase->getMock(
53
            HttpUtil::class,
54
            ['getGet']
55
        );
56
        $httpUtil->expects($testCase->any())
57
            ->method('getGet')
58
            ->willReturnCallback(function () {
59
                return RequestTraitTest::$getGet;
60
            });
61
62
        $utilContainer->register('Http', $httpUtil);
63
    }
64
65
66
    public static function tearDownAfterClass()