assertInstanceOf( LanguageService::class, $languageService ); } public function provideSplittableLanguages(): array { return [ [ 'en', true ], [ 'de', true ], [ 'fr', true ], [ 'ja', true ], [ 'ru', true ], [ 'zh', true ], [ 'ar', false ], [ 'fa', false ], ]; } /** * @dataProvider provideSplittableLanguages */ public function testCanWordsBeSplitSafely( string $code, bool $expected ) { $languageService = new LanguageService(); $result = $languageService->canWordsBeSplitSafely( $code ); $this->assertSame( $expected, $result ); } }