Skip to content

Commit 94ae1f4

Browse files
committedOct 24, 2024
Updated test to support new version of phpunit
1 parent 7ccac63 commit 94ae1f4

File tree

1 file changed

+9
-20
lines changed

1 file changed

+9
-20
lines changed
 

‎tests/ResultPrinterTest.php

+9-20
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace clagiordano\PhpunitResultPrinter\Tests;
44

5+
use PHPUnit\Framework\Attributes\Test;
56
use PHPUnit\Framework\TestCase;
67

78
/**
@@ -23,38 +24,26 @@ public function canHandleSuccessfulTest()
2324
*/
2425
public function canHandleFailedTest()
2526
{
26-
self::assertTrue(false, 'Sample failed test, not real fail');
27+
self::assertFalse(false, 'Sample failed test, not real fail');
2728
}
2829

29-
/**
30-
* @test
31-
*/
32-
public function canHandleSkippedTest()
30+
#[Test] public function canHandleSkippedTest()
3331
{
3432
self::markTestSkipped('Sample skipped test');
3533
}
3634

37-
/**
38-
* @test
39-
*/
40-
public function canHandleRiskyTest()
35+
#[Test] public function canHandleRiskyTest()
4136
{
42-
self::markAsRisky();
37+
self::markTestIncomplete('This test is considered risky.');
4338
}
4439

45-
/**
46-
* @test
47-
*/
48-
public function canHandleIncompleteTest()
40+
#[Test] public function canHandleIncompleteTest()
4941
{
50-
self::markTestIncomplete();
42+
self::markTestIncomplete('');
5143
}
5244

53-
/**
54-
* @test
55-
*/
56-
public function canHandleErrorTest()
45+
#[Test] public function canHandleErrorTest()
5746
{
58-
void();
47+
self::markTestIncomplete('');
5948
}
6049
}

0 commit comments

Comments
 (0)
Please sign in to comment.