Code Duplication    Length = 7-7 lines in 3 locations

src/Context/AccesibilityContext.php 3 locations

@@ 17-23 (lines=7) @@
14
    /**
15
     * @Then all images should have an alt attribute
16
     */
17
    public function allImagesShouldHaveAnAltAttribute()
18
    {
19
        $images = $this->getSession()->getPage()->findAll('xpath', '//img[not(@alt)]');
20
        if ($images !== null) {
21
            throw new \Exception("There are images without an alt attribute");
22
        } 
23
    }
24
25
    /**
26
     * @Then the title should not be longer than :arg1
@@ 39-45 (lines=7) @@
36
    /**
37
     * @Then all tables should have a table header
38
     */
39
    public function allTablesShouldHaveATableHeader()
40
    {
41
        $tables = $this->getSession()->getPage()->findAll('xpath', '//table/*[not(th)]');
42
        if ($tables !== null) {
43
            throw new \Exception("There are tables without a table header");
44
        }
45
    }
46
47
    /**
48
     * @Then all tables should have at least one data row
@@ 50-56 (lines=7) @@
47
    /**
48
     * @Then all tables should have at least one data row
49
     */
50
    public function allTablesShouldHaveAtLeastOneDataRow()
51
    {
52
        $tables = $this->getSession()->getPage()->findAll('xpath', '//table/*[not(td)]');
53
        if ($tables !== null) {
54
            throw new \Exception("There are tables without a data row");
55
        }
56
    }    
57
}
58