diff --git a/typed_data_example/src/TypedData/ColorDefinition.php b/typed_data_example/src/TypedData/ColorDefinition.php index 4ece8b3..fe36182 100644 --- a/typed_data_example/src/TypedData/ColorDefinition.php +++ b/typed_data_example/src/TypedData/ColorDefinition.php @@ -1,6 +1,6 @@ setClass('\Drupal\typed_data_example\Plugin\DataType\ColorSet'); // Instantiate a new ColorSet type. @@ -81,6 +81,7 @@ class ColorSetTest extends UnitTestCase { * @param string $class_name * The class name to test. * @param string $property_name + * The name of the property to access on the data type. * * @dataProvider propertyTestProvider */ diff --git a/typed_data_example/tests/src/Unit/Plugin/DataType/ColorTest.php b/typed_data_example/tests/src/Unit/Plugin/DataType/ColorTest.php index dba64ec..c0a0ba2 100644 --- a/typed_data_example/tests/src/Unit/Plugin/DataType/ColorTest.php +++ b/typed_data_example/tests/src/Unit/Plugin/DataType/ColorTest.php @@ -13,7 +13,7 @@ use Prophecy\Argument; /** * Test the Color data type class. * - * * @ingroup typed_data_example + * @ingroup typed_data_example * * @group typed_data_example * @group examples @@ -21,7 +21,9 @@ use Prophecy\Argument; class ColorTest extends UnitTestCase { /** - * @var \Drupal\typed_example\Plugin\DataType\Color + * The color data type. + * + * @var \Drupal\typed_data_example\Plugin\DataType\Color */ protected $color; @@ -31,7 +33,7 @@ class ColorTest extends UnitTestCase { protected function setUp() { // The color definition class is fairly safe to use without mocking. - $definition = ColorDefinition::create('typed_example_color'); + $definition = ColorDefinition::create('typed_data_example_color'); $definition->setClass('\Drupal\typed_data_example\Plugin\DataType\Color'); // Instantiate a new color data type. @@ -44,7 +46,7 @@ class ColorTest extends UnitTestCase { $typedDataProphecy = $this->prophesize('\Drupal\Core\TypedData\TypedDataManagerInterface'); $typedDataProphecy ->getPropertyInstance(Argument::any(), Argument::type('string'), Argument::any()) - ->will(function($args) use ($floatDefinition) { + ->will(function ($args) use ($floatDefinition) { $data = new FloatData($floatDefinition); if ($args[1] === 'red') { $data->setValue(255);