Code Duplication    Length = 22-24 lines in 2 locations

eZ/Publish/Core/Persistence/Legacy/Tests/Content/Language/Gateway/DoctrineDatabaseTest.php 1 location

@@ 102-125 (lines=24) @@
99
     * @covers eZ\Publish\Core\Persistence\Legacy\Content\Language\Gateway\DoctrineDatabase::updateLanguage
100
     * @covers eZ\Publish\Core\Persistence\Legacy\Content\Language\Gateway\DoctrineDatabase::setCommonLanguageColumns
101
     */
102
    public function testUpdateLanguage()
103
    {
104
        $gateway = $this->getDatabaseGateway();
105
106
        $language = $this->getLanguageFixture();
107
        $language->id = 2;
108
109
        $gateway->updateLanguage($language);
110
111
        $this->assertQueryResult(
112
            array(
113
                array(
114
                    'id' => '2',
115
                    'locale' => 'de-DE',
116
                    'name' => 'Deutsch (Deutschland)',
117
                    'disabled' => '0',
118
                ),
119
            ),
120
            $this->getDatabaseHandler()->createSelectQuery()
121
                ->select('id', 'locale', 'name', 'disabled')
122
                ->from('ezcontent_language')
123
                ->where('id=2')
124
        );
125
    }
126
127
    /**
128
     * @covers eZ\Publish\Core\Persistence\Legacy\Content\Language\Gateway\DoctrineDatabase::loadLanguageData

eZ/Publish/Core/Persistence/Legacy/Tests/Content/Section/Gateway/DoctrineDatabaseTest.php 1 location

@@ 58-79 (lines=22) @@
55
    /**
56
     * @covers eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway\DoctrineDatabase::insertSection
57
     */
58
    public function testInsertSection()
59
    {
60
        $gateway = $this->getDatabaseGateway();
61
62
        $gateway->insertSection('New Section', 'new_section');
63
        $query = $this->getDatabaseHandler()->createSelectQuery();
64
65
        $this->assertQueryResult(
66
            array(
67
                array(
68
                    'id' => '7',
69
                    'identifier' => 'new_section',
70
                    'name' => 'New Section',
71
                    'locale' => '',
72
                ),
73
            ),
74
            $query
75
                ->select('id', 'identifier', 'name', 'locale')
76
                ->from('ezsection')
77
                ->where($query->expr->eq('identifier', $query->bindValue('new_section')))
78
        );
79
    }
80
81
    /**
82
     * @covers eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway\DoctrineDatabase::updateSection