@@ -51,7 +51,6 @@ public function getArguments()
51
51
[__DIR__ .'/../../build/blog/ ' , __DIR__ .'/../config/blog.yaml ' ],
52
52
[__DIR__ .'/../../build/ecommerce/ ' , __DIR__ .'/../config/ecommerce.yaml ' ],
53
53
[__DIR__ .'/../../build/vgo/ ' , __DIR__ .'/../config/vgo.yaml ' ],
54
- [__DIR__ .'/../../build/public-properties/ ' , __DIR__ .'/../config/public-properties.yaml ' ],
55
54
[__DIR__ .'/../../build/mongodb/address-book/ ' , __DIR__ .'/../config/mongodb/address-book.yaml ' ],
56
55
[__DIR__ .'/../../build/mongodb/ecommerce/ ' , __DIR__ .'/../config/mongodb/ecommerce.yaml ' ],
57
56
];
@@ -61,14 +60,10 @@ public function testFluentMutators()
61
60
{
62
61
$ outputDir = __DIR__ .'/../../build/fluent-mutators ' ;
63
62
$ config = __DIR__ .'/../config/fluent-mutators.yaml ' ;
64
-
65
63
$ this ->fs ->mkdir ($ outputDir );
66
-
67
64
$ commandTester = new CommandTester (new GenerateTypesCommand ());
68
65
$ this ->assertEquals (0 , $ commandTester ->execute (['output ' => $ outputDir , 'config ' => $ config ]));
69
-
70
66
$ organization = file_get_contents ($ outputDir .'/AppBundle/Entity/Person.php ' );
71
-
72
67
$ this ->assertContains (<<<'PHP'
73
68
public function setUrl(?string $url): self
74
69
{
@@ -77,8 +72,7 @@ public function setUrl(?string $url): self
77
72
return $this;
78
73
}
79
74
PHP
80
- , $ organization );
81
-
75
+ , $ organization );
82
76
$ this ->assertContains (<<<'PHP'
83
77
public function addFriends(Person $friends): self
84
78
{
@@ -96,4 +90,21 @@ public function removeFriends(Person $friends): self
96
90
PHP
97
91
, $ organization );
98
92
}
93
+
94
+ public function testDoNotGenerateAccessorMethods ()
95
+ {
96
+ $ outputDir = __DIR__ .'/../../build/public-properties ' ;
97
+ $ config = __DIR__ .'/../config/public-properties.yaml ' ;
98
+
99
+ $ this ->fs ->mkdir ($ outputDir );
100
+
101
+ $ commandTester = new CommandTester (new GenerateTypesCommand ());
102
+ $ this ->assertEquals (0 , $ commandTester ->execute (['output ' => $ outputDir , 'config ' => $ config ]));
103
+
104
+ $ organization = file_get_contents ($ outputDir .'/AppBundle/Entity/Person.php ' );
105
+ $ this ->assertNotContains ('function get ' , $ organization );
106
+ $ this ->assertNotContains ('function set ' , $ organization );
107
+ $ this ->assertNotContains ('function add ' , $ organization );
108
+ $ this ->assertNotContains ('function remove ' , $ organization );
109
+ }
99
110
}
0 commit comments