2
2
3
3
namespace mglaman \PHPStanDrupal \Tests ;
4
4
5
+ use mglaman \PHPStanDrupal \Drupal \DrupalServiceDefinition ;
6
+ use mglaman \PHPStanDrupal \Drupal \ServiceMap ;
5
7
use PHPUnit \Framework \TestCase ;
6
8
7
9
final class ServiceMapFactoryTest extends TestCase
@@ -10,15 +12,15 @@ final class ServiceMapFactoryTest extends TestCase
10
12
/**
11
13
* @dataProvider getServiceProvider
12
14
*
13
- * @covers \mglaman\PHPStanDrupal\DrupalServiceDefinition::__construct
14
- * @covers \mglaman\PHPStanDrupal\DrupalServiceDefinition::getClass
15
- * @covers \mglaman\PHPStanDrupal\DrupalServiceDefinition::isPublic
16
- * @covers \mglaman\PHPStanDrupal\DrupalServiceDefinition::getAlias
17
- * @covers \mglaman\PHPStanDrupal\DrupalServiceDefinition::getId
18
- * @covers \mglaman\PHPStanDrupal\ServiceMap::setDrupalServices
19
- * @covers \mglaman\PHPStanDrupal\ServiceMap::getService
15
+ * @covers \mglaman\PHPStanDrupal\Drupal\ DrupalServiceDefinition::__construct
16
+ * @covers \mglaman\PHPStanDrupal\Drupal\ DrupalServiceDefinition::getClass
17
+ * @covers \mglaman\PHPStanDrupal\Drupal\ DrupalServiceDefinition::isPublic
18
+ * @covers \mglaman\PHPStanDrupal\Drupal\ DrupalServiceDefinition::getAlias
19
+ * @covers \mglaman\PHPStanDrupal\Drupal\ DrupalServiceDefinition::getId
20
+ * @covers \mglaman\PHPStanDrupal\Drupal\ ServiceMap::setDrupalServices
21
+ * @covers \mglaman\PHPStanDrupal\Drupal\ ServiceMap::getService
20
22
*/
21
- public function testFactory (string $ id , callable $ validator )
23
+ public function testFactory (string $ id , callable $ validator ): void
22
24
{
23
25
$ service = new ServiceMap ();
24
26
$ service ->setDrupalServices ([
@@ -49,8 +51,7 @@ function (?DrupalServiceDefinition $service): void {
49
51
];
50
52
yield [
51
53
'entity_type.manager ' ,
52
- function (?DrupalServiceDefinition $ service ): void {
53
- self ::assertNotNull ($ service );
54
+ function (DrupalServiceDefinition $ service ): void {
54
55
self ::assertEquals ('entity_type.manager ' , $ service ->getId ());
55
56
self ::assertEquals ('Drupal\Core\Entity\EntityTypeManager ' , $ service ->getClass ());
56
57
self ::assertTrue ($ service ->isPublic ());
@@ -66,8 +67,7 @@ function (?DrupalServiceDefinition $service): void {
66
67
];
67
68
yield [
68
69
'config.storage.sync ' ,
69
- function (?DrupalServiceDefinition $ service ): void {
70
- self ::assertNotNull ($ service );
70
+ function (DrupalServiceDefinition $ service ): void {
71
71
self ::assertEquals ('config.storage.staging ' , $ service ->getAlias ());
72
72
}
73
73
];
0 commit comments