diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Fixture/BarClass.php b/core/tests/Drupal/Tests/Core/DependencyInjection/Fixture/BarClass.php index 8e10adb..bec5d88 100644 --- a/core/tests/Drupal/Tests/Core/DependencyInjection/Fixture/BarClass.php +++ b/core/tests/Drupal/Tests/Core/DependencyInjection/Fixture/BarClass.php @@ -2,23 +2,44 @@ /** * @file - * A stub class for use with ContainerBuilderTest. - * - * @see Drupal\Tests\Core\DependencyInjection\ContainerBuilderTest + * Contains \Drupal\Tests\Core\DependencyInjection\Fixture\BarClass. */ namespace Drupal\Tests\Core\DependencyInjection\Fixture; +/** + * Stub class which acts as a service to test the container. + * + * @see \Drupal\Tests\Core\DependencyInjection\ContainerBuilderTest + * @see \Drupal\Tests\Core\DependencyInjection\Fixture\BazClass + */ class BarClass { + /** + * Storage for a protected BazClass object. + * + * @var Drupal\Tests\Core\DependencyInjection\Fixture\BazClass + */ protected $baz; - public $foo = 'foo'; - + /** + * Setter for our BazClass object. + * + * This method is called during the service initialization. + * + * @param \Drupal\Tests\Core\DependencyInjection\Fixture\BazClass $baz + * A BazClass object to store. + */ public function setBaz(BazClass $baz) { $this->baz = $baz; } + /** + * Getter for our BazClass object. + * + * @return \Drupal\Tests\Core\DependencyInjection\Fixture\BazClass + * The stored BazClass object. + */ public function getBaz() { return $this->baz; } diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Fixture/BazClass.php b/core/tests/Drupal/Tests/Core/DependencyInjection/Fixture/BazClass.php index 1087a7e..361b4a8 100644 --- a/core/tests/Drupal/Tests/Core/DependencyInjection/Fixture/BazClass.php +++ b/core/tests/Drupal/Tests/Core/DependencyInjection/Fixture/BazClass.php @@ -2,35 +2,17 @@ /** * @file - * A stub class for use with ContainerBuilderTest. - * - * @see Drupal\Tests\Core\DependencyInjection\ContainerBuilderTest + * Contains \Drupal\Tests\Core\DependencyInjection\Fixture\BazClass. */ namespace Drupal\Tests\Core\DependencyInjection\Fixture; +/** + * Stub class which acts as a service dependency, to test the container. + * + * @see \Drupal\Tests\Core\DependencyInjection\ContainerBuilderTest + * @see \Drupal\Tests\Core\DependencyInjection\Fixture\BarClass + */ class BazClass { - protected $foo; - - public function setFoo(Foo $foo) { - $this->foo = $foo; - } - - public function configure($instance) { - $instance->configure(); - } - - public static function getInstance() { - return new self(); - } - - public static function configureStatic($instance) { - $instance->configure(); - } - - public static function configureStatic1() { - - } - }