File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
tests/unit/TextUI/Output/Default Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 13
13
use PHPUnit \Framework \Attributes \DataProvider ;
14
14
use PHPUnit \Framework \Attributes \Medium ;
15
15
use PHPUnit \Framework \TestCase ;
16
+ use PHPUnit \TextUI \CannotOpenSocketException ;
16
17
use PHPUnit \TextUI \InvalidSocketException ;
17
18
use PHPUnit \TextUI \Output \DefaultPrinter ;
18
19
@@ -22,11 +23,17 @@ final class DefaultPrinterTest extends TestCase
22
23
{
23
24
public static function providePrinter (): array
24
25
{
25
- return [
26
- [DefaultPrinter::standardOutput ()],
27
- [DefaultPrinter::standardError ()],
28
- [DefaultPrinter::from ('socket://www.example.com:80 ' )],
26
+ $ data = [
27
+ 'standard output ' => [DefaultPrinter::standardOutput ()],
28
+ 'standard error ' => [DefaultPrinter::standardError ()],
29
29
];
30
+
31
+ try {
32
+ $ data ['socket ' ] = [DefaultPrinter::from ('socket://www.example.com:80 ' )];
33
+ } catch (CannotOpenSocketException $ e ) {
34
+ }
35
+
36
+ return $ data ;
30
37
}
31
38
32
39
#[DataProvider('providePrinter ' )]
You can’t perform that action at this time.
0 commit comments