@@ -163,5 +163,65 @@ public function testMultipleHeaders(): void {
163163 $ this ->assertSame ('title PHP Class Diagram ' , $ options ->headers ()[0 ], 'specified header. title ' );
164164 $ this ->assertSame ('skinparam pageMargin 10 ' , $ options ->headers ()[1 ], 'specified header. pageMargin ' );
165165 }
166+ public function testInclude (): void {
167+ $ opt = [
168+ 'include ' => '*.php8 ' ,
169+ ];
170+
171+ $ options = new Options ($ opt );
172+
173+ $ this ->assertSame ('*.php8 ' , $ options ->includes ()[0 ], 'specified include. ' );
174+ }
175+ public function testMultipleInclude (): void {
176+ $ opt = [
177+ 'include ' => [
178+ '*.php7 ' ,
179+ '*.php8 ' ,
180+ ],
181+ ];
182+
183+ $ options = new Options ($ opt );
184+
185+ $ this ->assertSame ('*.php7 ' , $ options ->includes ()[0 ], 'specified include. php7 ' );
186+ $ this ->assertSame ('*.php8 ' , $ options ->includes ()[1 ], 'specified include. php8 ' );
187+ }
188+ public function testIncludeDefault (): void {
189+ $ opt = [
190+ ];
191+
192+ $ options = new Options ($ opt );
193+
194+ $ this ->assertSame ('*.php ' , $ options ->includes ()[0 ], 'default include. ' );
195+ }
196+ public function testexclude (): void {
197+ $ opt = [
198+ 'exclude ' => '*Exception.php ' ,
199+ ];
200+
201+ $ options = new Options ($ opt );
202+
203+ $ this ->assertSame ('*Exception.php ' , $ options ->excludes ()[0 ], 'specified exclude. ' );
204+ }
205+ public function testMultipleExclude (): void {
206+ $ opt = [
207+ 'exclude ' => [
208+ '*Exception.php ' ,
209+ 'config.php ' ,
210+ ],
211+ ];
212+
213+ $ options = new Options ($ opt );
214+
215+ $ this ->assertSame ('*Exception.php ' , $ options ->excludes ()[0 ], 'specified exclude. *Exception.php ' );
216+ $ this ->assertSame ('config.php ' , $ options ->excludes ()[1 ], 'specified exclude. config.php ' );
217+ }
218+ public function testExcludeDefault (): void {
219+ $ opt = [
220+ ];
221+
222+ $ options = new Options ($ opt );
223+
224+ $ this ->assertSame (0 , count ($ options ->excludes ()), 'default exclude is empty. ' );
225+ }
166226
167227}
0 commit comments