Code Duplication    Length = 10-10 lines in 2 locations

tests/unit/Parser/FieldParser/FieldParserDateOffsetTest.php 1 location

@@ 32-41 (lines=10) @@
29
    /**
30
     * @return FieldParserDateOffset
31
     */
32
    protected function getParser()
33
    {
34
        if (!$this->parser) {
35
            $this->dateTimeNow = m::mock(\DateTimeImmutable::class);
36
            $this->dateFormatterFactory = m::mock(DateFormatterFactory::class);
37
            $this->parser = new FieldParserDateOffset($this->dateTimeNow, $this->dateFormatterFactory);
38
        }
39
40
        return $this->parser;
41
    }
42
43
    public function testGetText()
44
    {

tests/unit/Parser/FieldParser/FieldParserDateTest.php 1 location

@@ 37-46 (lines=10) @@
34
    /**
35
     * @return FieldParserDate
36
     */
37
    protected function getParser()
38
    {
39
        if (!$this->parser) {
40
            $this->dateTimeNow = m::mock(\DateTimeImmutable::class);
41
            $this->dateFormatterFactory = m::mock(DateFormatterFactory::class);
42
            $this->parser = new FieldParserDate($this->dateTimeNow, $this->dateFormatterFactory);
43
        }
44
45
        return $this->parser;
46
    }
47
48
    public function testGetText()
49
    {