Code Duplication    Length = 15-16 lines in 3 locations

Tests/Unit/Migration/MigrationExtensionManagerTest.php 3 locations

@@ 130-145 (lines=16) @@
127
        $this->assertSame($otherExtension, $migration->getTestExtensionDepended()->getTestExtension());
128
    }
129
130
    public function testExtensionWithNoAwareInterface()
131
    {
132
        $dir = 'RDV\Bundle\MigrationBundle\Tests\Unit\Migration\Fixtures\Extension';
133
        $this->setExpectedException(
134
            '\RuntimeException',
135
            sprintf(
136
                'The extension aware interface for "%s\NoAwareInterfaceExtension" was not found. '
137
                . 'Make sure that "%s\NoAwareInterfaceExtensionAwareInterface" interface is declared.',
138
                $dir,
139
                $dir
140
            )
141
        );
142
143
        $manager = new MigrationExtensionManager();
144
        $manager->addExtension('test', new NoAwareInterfaceExtension());
145
    }
146
147
    public function testAnotherExtensionWithNoAwareInterface()
148
    {
@@ 147-161 (lines=15) @@
144
        $manager->addExtension('test', new NoAwareInterfaceExtension());
145
    }
146
147
    public function testAnotherExtensionWithNoAwareInterface()
148
    {
149
        $dir = 'RDV\Bundle\MigrationBundle\Tests\Unit\Migration\Fixtures\Extension';
150
        $this->setExpectedException(
151
            '\RuntimeException',
152
            sprintf(
153
                'The extension aware interface for neither "%s\AnotherNoAwareInterfaceExtension"'
154
                . ' not one of its parent classes was not found.',
155
                $dir
156
            )
157
        );
158
159
        $manager = new MigrationExtensionManager();
160
        $manager->addExtension('test', new AnotherNoAwareInterfaceExtension());
161
    }
162
163
    public function testExtensionWithInvalidAwareInterface()
164
    {
@@ 163-177 (lines=15) @@
160
        $manager->addExtension('test', new AnotherNoAwareInterfaceExtension());
161
    }
162
163
    public function testExtensionWithInvalidAwareInterface()
164
    {
165
        $dir = 'RDV\Bundle\MigrationBundle\Tests\Unit\Migration\Fixtures\Extension';
166
        $this->setExpectedException(
167
            '\RuntimeException',
168
            sprintf(
169
                'The method "%s\InvalidAwareInterfaceExtensionAwareInterface::setInvalidAwareInterfaceExtension"'
170
                . ' was not found.',
171
                $dir
172
            )
173
        );
174
175
        $manager = new MigrationExtensionManager();
176
        $manager->addExtension('test', new InvalidAwareInterfaceExtension());
177
    }
178
}
179