@@ -93,18 +93,18 @@ public function testObjectAsObject()
9393 $ this ->assertSame (600 , Ttl::fromSeconds ((object ) ['foo ' => 'Foo ' ]));
9494 }
9595
96- public function testContract ()
96+ public function testInstances (): void
9797 {
98- $ this ->assertSame (3600 , Ttl::fromMinutes (new AsCarbon ('foo ' )));
99- $ this ->assertSame (7200 , Ttl::fromSeconds (new AsCarbon ('bar ' )));
98+ $ this ->assertSame (3600 , Ttl::fromMinutes (( new AsCarbon ('foo ' ))-> cacheTtl ( )));
99+ $ this ->assertSame (7200 , Ttl::fromSeconds (( new AsCarbon ('bar ' ))-> cacheTtl ( )));
100100
101- $ this ->assertSame (3600 , Ttl::fromMinutes (new AsDateTime ('foo ' )));
102- $ this ->assertSame (7200 , Ttl::fromSeconds (new AsDateTime ('bar ' )));
101+ $ this ->assertSame (3600 , Ttl::fromMinutes (( new AsDateTime ('foo ' ))-> cacheTtl ( )));
102+ $ this ->assertSame (7200 , Ttl::fromSeconds (( new AsDateTime ('bar ' ))-> cacheTtl ( )));
103103
104- $ this ->assertSame (600 , Ttl::fromMinutes (new AsInteger ('foo ' )));
105- $ this ->assertSame (20 , Ttl::fromSeconds (new AsInteger ('bar ' )));
104+ $ this ->assertSame (600 , Ttl::fromMinutes (( new AsInteger ('foo ' ))-> cacheTtl ( )));
105+ $ this ->assertSame (20 , Ttl::fromSeconds (( new AsInteger ('bar ' ))-> cacheTtl ( )));
106106
107- $ this ->assertSame (600 , Ttl::fromMinutes (new AsString ('foo ' )));
108- $ this ->assertSame (20 , Ttl::fromSeconds (new AsString ('bar ' )));
107+ $ this ->assertSame (600 , Ttl::fromMinutes (( new AsString ('foo ' ))-> cacheTtl ( )));
108+ $ this ->assertSame (20 , Ttl::fromSeconds (( new AsString ('bar ' ))-> cacheTtl ( )));
109109 }
110110}
0 commit comments