Code Duplication    Length = 10-10 lines in 2 locations

src/Kunstmaan/AdminBundle/Tests/unit/Helper/AdminRouteHelperTest.php 2 locations

@@ 26-35 (lines=10) @@
23
    /**
24
     * @covers \Kunstmaan\AdminBundle\Helper\AdminRouteHelper::isAdminRoute
25
     */
26
    public function testIsAdminRouteReturnsTrueWhenAdminUrl()
27
    {
28
        $adminRouteHelper = $this->getAdminRouteHelper(self::$ADMIN_KEY);
29
        $result = $adminRouteHelper->isAdminRoute(sprintf(self::$ADMIN_URL, self::$ADMIN_KEY));
30
        $this->assertTrue($result);
31
32
        $adminRouteHelper = $this->getAdminRouteHelper(self::$ALTERNATIVE_ADMIN_KEY);
33
        $result = $adminRouteHelper->isAdminRoute(sprintf(self::$ADMIN_URL, self::$ALTERNATIVE_ADMIN_KEY));
34
        $this->assertTrue($result);
35
    }
36
37
    /**
38
     * @covers \Kunstmaan\AdminBundle\Helper\AdminRouteHelper::isAdminRoute
@@ 40-49 (lines=10) @@
37
    /**
38
     * @covers \Kunstmaan\AdminBundle\Helper\AdminRouteHelper::isAdminRoute
39
     */
40
    public function testIsAdminRouteReturnsFalseWhenFrontendUrl()
41
    {
42
        $adminRouteHelper = $this->getAdminRouteHelper(self::$ADMIN_KEY);
43
        $result = $adminRouteHelper->isAdminRoute(sprintf(self::$NON_ADMIN_URL, self::$ADMIN_KEY));
44
        $this->assertFalse($result);
45
46
        $adminRouteHelper = $this->getAdminRouteHelper(self::$ALTERNATIVE_ADMIN_KEY);
47
        $result = $adminRouteHelper->isAdminRoute(sprintf(self::$NON_ADMIN_URL, self::$ALTERNATIVE_ADMIN_KEY));
48
        $this->assertFalse($result);
49
    }
50
51
    /**
52
     * @covers \Kunstmaan\AdminBundle\Helper\AdminRouteHelper::isAdminRoute