File tree 2 files changed +36
-0
lines changed
2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,26 @@ public function show(string $id): array
44
44
return $ this ->get ("blocks/ {$ id }" );
45
45
}
46
46
47
+ /**
48
+ * Get the first block.
49
+ *
50
+ * @return array
51
+ */
52
+ public function first (): array
53
+ {
54
+ return $ this ->get ('blocks/first ' );
55
+ }
56
+
57
+ /**
58
+ * Get the last block.
59
+ *
60
+ * @return array
61
+ */
62
+ public function last (): array
63
+ {
64
+ return $ this ->get ('blocks/last ' );
65
+ }
66
+
47
67
/**
48
68
* Get all transactions by the given block.
49
69
*
Original file line number Diff line number Diff line change @@ -39,6 +39,22 @@ public function show_calls_correct_url()
39
39
});
40
40
}
41
41
42
+ /** @test */
43
+ public function first_calls_correct_url ()
44
+ {
45
+ $ this ->assertResponse ('GET ' , 'blocks/first ' , function ($ connection ) {
46
+ return $ connection ->blocks ()->first ();
47
+ });
48
+ }
49
+
50
+ /** @test */
51
+ public function last_calls_correct_url ()
52
+ {
53
+ $ this ->assertResponse ('GET ' , 'blocks/last ' , function ($ connection ) {
54
+ return $ connection ->blocks ()->last ();
55
+ });
56
+ }
57
+
42
58
/** @test */
43
59
public function transactions_calls_correct_url ()
44
60
{
You can’t perform that action at this time.
0 commit comments