Code Duplication    Length = 12-12 lines in 2 locations

eZ/Publish/Core/MVC/Symfony/SiteAccess/Tests/RouterTest.php 2 locations

@@ 46-57 (lines=12) @@
43
        $router->setSiteAccess();
44
    }
45
46
    public function testMatchWithDevEnvFail()
47
    {
48
        $router = $this->createRouter(true);
49
        putenv('EZPUBLISH_SITEACCESS=' . self::UNDEFINED_SA_NAME);
50
51
        $this->expectException(InvalidSiteAccessException::class);
52
        $this->expectExceptionMessageRegExp(
53
            '/^Invalid SiteAccess \'' . self::UNDEFINED_SA_NAME . '\', matched by .+\\. Valid SiteAccesses are/'
54
        );
55
56
        $router->match(new SimplifiedRequest());
57
    }
58
59
    public function testMatchWithProdEnvFail()
60
    {
@@ 59-70 (lines=12) @@
56
        $router->match(new SimplifiedRequest());
57
    }
58
59
    public function testMatchWithProdEnvFail()
60
    {
61
        $router = $this->createRouter();
62
        putenv('EZPUBLISH_SITEACCESS=' . self::UNDEFINED_SA_NAME);
63
64
        $this->expectException(InvalidSiteAccessException::class);
65
        $this->expectExceptionMessageRegExp(
66
            '/^Invalid SiteAccess \'' . self::UNDEFINED_SA_NAME . '\', matched by .+\\.$/'
67
        );
68
69
        $router->match(new SimplifiedRequest());
70
    }
71
72
    public function testMatchWithEnv()
73
    {