Code Duplication    Length = 7-7 lines in 2 locations

src/Context/AccesibilityContext.php 2 locations

@@ 20-26 (lines=7) @@
17
    /**
18
     * @Then all images should have an alt attribute
19
     */
20
    public function allImagesShouldHaveAnAltAttribute()
21
    {
22
        $images = $this->getSession()->getPage()->findAll('xpath', '//img[not(@alt)]');
23
        if ($images != null) {
24
            throw new \Exception("There are images without an alt attribute");
25
        } 
26
    }
27
28
    /**
29
     * @Then the title should not be longer than :arg1
@@ 42-48 (lines=7) @@
39
    /**
40
     * @Then all tables should have a table header
41
     */
42
    public function allTablesShouldHaveATableHeader()
43
    {
44
        $tables = $this->getSession()->getPage()->findAll('xpath', '//table/*[not(th)]');
45
        if ($tables != null) {
46
            throw new \Exception("There are tables without a table header");
47
        }
48
    }
49
}
50