File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed
Formatter/Presenter/Differ Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 33namespace integration \PhpSpec \Console \Prompter ;
44
55use PhpSpec \Console \Prompter \Question ;
6+ use PHPUnit \Framework \Attributes \RequiresMethod ;
7+ use PHPUnit \Framework \Attributes \Test ;
68use PHPUnit \Framework \TestCase ;
9+ use Symfony \Component \Console \Helper \QuestionHelper ;
710use Symfony \Component \Console \Question \ConfirmationQuestion ;
811
912/**
1013 * @requires function \Symfony\Component\Console\Helper\QuestionHelper::ask
1114 */
15+ #[RequiresMethod(QuestionHelper::class, 'ask ' )]
1216class QuestionTest extends TestCase
1317{
1418 /**
@@ -43,6 +47,7 @@ protected function setUp() : void
4347 /**
4448 * @test
4549 */
50+ #[Test]
4651 function it_is_a_prompter ()
4752 {
4853 $ this ->assertInstanceOf ('PhpSpec\Console\Prompter ' , $ this ->prompter );
@@ -51,6 +56,7 @@ function it_is_a_prompter()
5156 /**
5257 * @test
5358 */
59+ #[Test]
5460 function it_can_ask_a_question_and_return_the_result ()
5561 {
5662 $ this ->questionHelper ->expects ($ this ->once ())
Original file line number Diff line number Diff line change 44
55namespace PhpSpec \Formatter \Presenter \Differ ;
66
7+ use PHPUnit \Framework \Attributes \Test ;
78use PHPUnit \Framework \TestCase ;
89use SebastianBergmann \Exporter \Exporter ;
910
@@ -26,24 +27,28 @@ public function setUp() : void
2627 }
2728
2829 /** @test */
30+ #[Test]
2931 public function it_is_an_differ_engine ()
3032 {
3133 self ::assertInstanceOf (DifferEngine::class, $ this ->engine );
3234 }
3335
3436 /** @test */
37+ #[Test]
3538 public function it_does_not_support_scalars ()
3639 {
3740 self ::assertFalse ($ this ->engine ->supports (1 , 2 ));
3841 }
3942
4043 /** @test */
44+ #[Test]
4145 public function it_only_supports_objects ()
4246 {
4347 self ::assertTrue ($ this ->engine ->supports (new \StdClass (), new \StdClass ()));
4448 }
4549
4650 /** @test */
51+ #[Test]
4752 public function it_converts_objects_to_string_and_diffs_the_result ()
4853 {
4954 $ this ->stringDiffer ->method ('compare ' )
Original file line number Diff line number Diff line change 77use PhpSpec \Loader \StreamWrapper ;
88use PhpSpec \Loader \Transformer \InMemoryTypeHintIndex ;
99use PhpSpec \Loader \Transformer \TypeHintRewriter ;
10+ use PHPUnit \Framework \Attributes \Test ;
1011use PHPUnit \Framework \TestCase ;
1112
1213class StreamWrapperTest extends TestCase
@@ -23,6 +24,7 @@ function setUp() : void
2324 * @test
2425 * @requires PHP 7.0
2526 */
27+ #[Test]
2628 function it_loads_a_spec_with_no_typehints ()
2729 {
2830 require StreamWrapper::wrapPath (__DIR__ .'/examples/ExampleSpec.php ' );
You can’t perform that action at this time.
0 commit comments