|
7 | 7 |
|
8 | 8 | use Phpfastcache\Api; |
9 | 9 | use Phpfastcache\Exceptions\PhpfastcacheRootException; |
10 | | -use Phpfastcache\Helper\TestHelper; |
| 10 | +use Phpfastcache\Tests\Helper\TestHelper; |
11 | 11 |
|
12 | 12 | chdir(__DIR__); |
13 | 13 | require_once __DIR__ . '/../vendor/autoload.php'; |
|
18 | 18 | */ |
19 | 19 | try { |
20 | 20 | $version = Api::getVersion(); |
21 | | - $testHelper->printPassText(sprintf('Successfully retrieved the API version: %s', $version)); |
| 21 | + $testHelper->assertPass(sprintf('Successfully retrieved the API version: %s', $version)); |
22 | 22 | } catch (PhpfastcacheRootException $e) { |
23 | | - $testHelper->printFailText(sprintf('Failed to retrieve the API version with the following error error: %s', $e->getMessage())); |
| 23 | + $testHelper->assertFail(sprintf('Failed to retrieve the API version with the following error error: %s', $e->getMessage())); |
24 | 24 | } |
25 | 25 |
|
26 | 26 | /** |
27 | 27 | * Testing PhpFastCache version |
28 | 28 | */ |
29 | 29 | try { |
30 | 30 | $version = Api::getPhpFastCacheVersion(); |
31 | | - $testHelper->printPassText(sprintf('Successfully retrieved PhpFastCache version: %s', $version)); |
| 31 | + $testHelper->assertPass(sprintf('Successfully retrieved PhpFastCache version: %s', $version)); |
32 | 32 | } catch (PhpfastcacheRootException $e) { |
33 | | - $testHelper->printFailText(sprintf('Failed to retrieve the PhpFastCache version with the following error error: %s', $e->getMessage())); |
| 33 | + $testHelper->assertFail(sprintf('Failed to retrieve the PhpFastCache version with the following error error: %s', $e->getMessage())); |
34 | 34 | } |
35 | 35 |
|
36 | 36 | /** |
37 | 37 | * Testing API changelog |
38 | 38 | */ |
39 | 39 | try { |
40 | 40 | $changelog = Api::getChangelog(); |
41 | | - $testHelper->printPassText(sprintf("Successfully retrieved API changelog:\n%s", $changelog)); |
| 41 | + $testHelper->assertPass(sprintf("Successfully retrieved API changelog:\n%s", $changelog)); |
42 | 42 | } catch (PhpfastcacheRootException $e) { |
43 | | - $testHelper->printFailText(sprintf('Failed to retrieve the API changelog with the following error error: %s', $e->getMessage())); |
| 43 | + $testHelper->assertFail(sprintf('Failed to retrieve the API changelog with the following error error: %s', $e->getMessage())); |
44 | 44 | } |
45 | 45 |
|
46 | 46 | /** |
47 | 47 | * Testing PhpFastCache changelog |
48 | 48 | */ |
49 | 49 | try { |
50 | 50 | $changelog = Api::getPhpFastCacheChangelog(); |
51 | | - $testHelper->printPassText(sprintf("Successfully retrieved PhpFastCache changelog:\n%s", $changelog)); |
| 51 | + $testHelper->assertPass(sprintf("Successfully retrieved PhpFastCache changelog:\n%s", $changelog)); |
52 | 52 | } catch (PhpfastcacheRootException $e) { |
53 | | - $testHelper->printFailText(sprintf('Failed to retrieve the PhpFastCache changelog with the following error error: %s', $e->getMessage())); |
| 53 | + $testHelper->assertFail(sprintf('Failed to retrieve the PhpFastCache changelog with the following error error: %s', $e->getMessage())); |
54 | 54 | } |
55 | 55 |
|
56 | 56 | $testHelper->terminateTest(); |
0 commit comments