11<?php
22
3- namespace UUID ;
3+ declare (strict_types=1 );
4+
5+ namespace UUID \Test ;
46
57use PHPUnit \Framework \TestCase ;
8+ use UUID \UUID ;
69
710/**
811 * @covers \UUID\UUID
@@ -11,7 +14,7 @@ final class UuidTest extends TestCase
1114{
1215 public function testCanGenerateValidVersion3 ()
1316 {
14- $ this ->assertEquals (
17+ $ this ->assertSame (
1518 '11a38b9a-b3da-360f-9353-a5a725514269 ' ,
1619 UUID ::uuid3 (UUID ::NAMESPACE_DNS , 'php.net ' )
1720 );
@@ -33,7 +36,7 @@ public function testCanGenerateValidVersion4()
3336
3437 public function testCanGenerateValidVersion5 ()
3538 {
36- $ this ->assertEquals (
39+ $ this ->assertSame (
3740 'c4a760a8-dbcf-5254-a0d9-6a4474bd1b62 ' ,
3841 UUID ::uuid5 (UUID ::NAMESPACE_DNS , 'php.net ' )
3942 );
@@ -97,19 +100,19 @@ public function testCanValidate()
97100
98101 public function testCanGetVersion ()
99102 {
100- $ this ->assertEquals (
103+ $ this ->assertSame (
101104 3 ,
102105 UUID ::getVersion ('11a38b9a-b3da-360f-9353-a5a725514269 ' )
103106 );
104- $ this ->assertEquals (
107+ $ this ->assertSame (
105108 5 ,
106109 UUID ::getVersion ('c4a760a8-dbcf-5254-a0d9-6a4474bd1b62 ' )
107110 );
108111 }
109112
110113 public function testCanCompare ()
111114 {
112- $ this ->assertEquals (
115+ $ this ->assertSame (
113116 0 ,
114117 UUID ::cmp ('c4a760a8-dbcf-5254-a0d9-6a4474bd1b62 ' , 'C4A760A8-DBCF-5254-A0D9-6A4474BD1B62 ' )
115118 );
@@ -121,27 +124,27 @@ public function testCanCompare()
121124
122125 public function testToString ()
123126 {
124- $ this ->assertEquals (
127+ $ this ->assertSame (
125128 'c4a760a8-dbcf-5254-a0d9-6a4474bd1b62 ' ,
126129 UUID ::toString ('{C4A760A8-DBCF-5254-A0D9-6A4474BD1B62} ' )
127130 );
128131 }
129132
130133 public function testCanUseAliases ()
131134 {
132- $ this ->assertEquals (
135+ $ this ->assertSame (
133136 '11a38b9a-b3da-360f-9353-a5a725514269 ' ,
134137 UUID ::v3 (UUID ::NAMESPACE_DNS , 'php.net ' )
135138 );
136- $ this ->assertEquals (
139+ $ this ->assertSame (
137140 4 ,
138141 UUID ::getVersion (UUID ::v4 ())
139142 );
140- $ this ->assertEquals (
143+ $ this ->assertSame (
141144 'c4a760a8-dbcf-5254-a0d9-6a4474bd1b62 ' ,
142145 UUID ::v5 (UUID ::NAMESPACE_DNS , 'php.net ' )
143146 );
144- $ this ->assertEquals (
147+ $ this ->assertSame (
145148 6 ,
146149 UUID ::getVersion (UUID ::v6 ())
147150 );
0 commit comments