File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 1515namespace Tests ;
1616
1717use OpenLRW \OpenLRW ;
18- use OpenLRW \Entity \User ;
18+ use OpenLRW \Model \User ;
1919use OpenLRW \Exception \NotFoundException ;
2020use PHPUnit \Framework \TestCase ;
2121
2222class UserTest extends TestCase
2323{
2424
25+ public function testGivenNameShouldBeString ()
26+ {
27+ $ user = new User ();
28+ $ user ->givenName = 'foo ' ;
29+ $ this ->assertEquals ($ user ->givenName , 'foo ' );
30+ }
31+
32+
2533 public function testUserShouldNotBeNull ()
2634 {
2735 new OpenLRW (OpenLRWTest::URL , OpenLRWTest::KEY , OpenLRWTest::PASSWORD );
@@ -30,6 +38,16 @@ public function testUserShouldNotBeNull()
3038 $ this ->assertNotNull ($ user );
3139 }
3240
41+
42+ public function testUserSourcedIdShouldBeString ()
43+ {
44+ new OpenLRW (OpenLRWTest::URL , OpenLRWTest::KEY , OpenLRWTest::PASSWORD );
45+ OpenLRW::generateJwt ();
46+ $ user = User::find ('test2u ' );
47+ $ this ->assertEquals ($ user ->sourcedId , 'test2u ' );
48+ }
49+
50+
3351 public function testUserShouldThrowException ()
3452 {
3553 $ this ->expectException (NotFoundException::class);
You can’t perform that action at this time.
0 commit comments