22
33namespace Spatie \Snapshots \Test \Integration ;
44
5+ use PHPUnit \Framework \Attributes \Test ;
56use PHPUnit \Framework \TestCase ;
67use Spatie \Snapshots \MatchesSnapshots ;
78
@@ -17,63 +18,63 @@ public function setUp(): void
1718 $ this ->setUpComparesSnapshotFiles ();
1819 }
1920
20- /** @test */
21+ #[Test]
2122 public function can_match_a_string_snapshot ()
2223 {
2324 $ data = 'Foo ' ;
2425
2526 $ this ->assertMatchesSnapshot ($ data );
2627 }
2728
28- /** @test */
29+ #[Test]
2930 public function can_match_an_html_snapshot ()
3031 {
3132 $ data = '<!doctype html><html lang="en"><head></head><body><h1>Hello, world!</h1></body></html> ' ;
3233
3334 $ this ->assertMatchesHtmlSnapshot ($ data );
3435 }
3536
36- /** @test */
37+ #[Test]
3738 public function can_match_an_xml_snapshot ()
3839 {
3940 $ data = '<foo><bar>Baz</bar></foo> ' ;
4041
4142 $ this ->assertMatchesXmlSnapshot ($ data );
4243 }
4344
44- /** @test */
45+ #[Test]
4546 public function can_match_a_json_snapshot ()
4647 {
4748 $ data = '{"foo":"foo","bar":"bar","baz":"baz"} ' ;
4849
4950 $ this ->assertMatchesJsonSnapshot ($ data );
5051 }
5152
52- /** @test */
53+ #[Test]
5354 public function can_match_an_array_snapshot ()
5455 {
5556 $ data = ['foo ' => 'foo ' , 'bar ' => 'bar ' , 'baz ' => 'baz ' ];
5657
5758 $ this ->assertMatchesJsonSnapshot ($ data );
5859 }
5960
60- /** @test */
61+ #[Test]
6162 public function can_match_a_file_hash_snapshot ()
6263 {
6364 $ filePath = __DIR__ .'/stubs/example_snapshots/snapshot.json ' ;
6465
6566 $ this ->assertMatchesFileHashSnapshot ($ filePath );
6667 }
6768
68- /** @test */
69+ #[Test]
6970 public function can_match_a_file_snapshot ()
7071 {
7172 $ filePath = __DIR__ .'/stubs/test_files/friendly_man.jpg ' ;
7273
7374 $ this ->assertMatchesFileSnapshot ($ filePath );
7475 }
7576
76- /** @test */
77+ #[Test]
7778 public function can_do_multiple_snapshot_assertions ()
7879 {
7980 $ this ->assertMatchesSnapshot ('Foo ' );
0 commit comments