PHP8
[m6w6/seekat] / tests / ErrorsTest.php
1 <?php
2
3 class ErrorsTest extends BaseTest
4 {
5 use ConsumePromise;
6 use AssertCancelled;
7 use AssertFailure;
8
9 /**
10 * @dataProvider provideAPI
11 */
12 function testCancellation($api) {
13 $promise = $api->users->m6w6();
14
15 $api->getFuture()->cancelPromise($promise);
16 $this->assertCancelled($promise);
17 }
18
19 /**
20 * @dataProvider provideAPI
21 */
22 function test404($api) {
23 $error = $this->assertFailure($api->generate->a404);
24 $this->assertEquals($error->getMessage(), "Not Found");
25 }
26 }