Added the Search API Synonym module to deal specifically with licence and license...
[yaffs-website] / vendor / symfony / dependency-injection / Tests / DefinitionDecoratorTest.php
index 6be4ad17fd840f696b932ea312fe97b52fec76b0..92a212ec416a61f0b0b8635f5d77135eee6f19e7 100644 (file)
@@ -14,6 +14,9 @@ namespace Symfony\Component\DependencyInjection\Tests;
 use PHPUnit\Framework\TestCase;
 use Symfony\Component\DependencyInjection\DefinitionDecorator;
 
+/**
+ * @group legacy
+ */
 class DefinitionDecoratorTest extends TestCase
 {
     public function testConstructor()
@@ -50,32 +53,6 @@ class DefinitionDecoratorTest extends TestCase
         );
     }
 
-    /**
-     * @dataProvider provideLegacyPropertyTests
-     * @group legacy
-     */
-    public function testLegacySetProperty($property, $changeKey)
-    {
-        $def = new DefinitionDecorator('foo');
-
-        $getter = 'get'.ucfirst($property);
-        $setter = 'set'.ucfirst($property);
-
-        $this->assertNull($def->$getter());
-        $this->assertSame($def, $def->$setter('foo'));
-        $this->assertEquals('foo', $def->$getter());
-        $this->assertEquals(array($changeKey => true), $def->getChanges());
-    }
-
-    public function provideLegacyPropertyTests()
-    {
-        return array(
-            array('factoryClass', 'factory_class'),
-            array('factoryMethod', 'factory_method'),
-            array('factoryService', 'factory_service'),
-        );
-    }
-
     public function testSetPublic()
     {
         $def = new DefinitionDecorator('foo');
@@ -101,9 +78,9 @@ class DefinitionDecoratorTest extends TestCase
         $def = new DefinitionDecorator('foo');
 
         $this->assertFalse($def->isAutowired());
-        $this->assertSame($def, $def->setAutowired(false));
-        $this->assertFalse($def->isAutowired());
-        $this->assertEquals(array('autowire' => true), $def->getChanges());
+        $this->assertSame($def, $def->setAutowired(true));
+        $this->assertTrue($def->isAutowired());
+        $this->assertSame(array('autowired' => true), $def->getChanges());
     }
 
     public function testSetArgument()