brilo-example/tests/Integration/Service/Remote/BriloApiPostsTest.php

29 lines
698 B
PHP
Raw Permalink Normal View History

2024-07-29 16:50:58 +00:00
<?php
declare(strict_types=1);
namespace App\Tests\Integration\Service\Remote;
use App\Service\Remote\BriloApiPosts;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
class BriloApiPostsTest extends KernelTestCase
{
public function setUp(): void
{
parent::bootKernel();
}
public function testBlogApiUsersAreRetrieved(): void
{
/**
* @var BriloApiPosts $api
*/
$api = static::getContainer()->get(BriloApiPosts::class);
$users = $api->getPosts();
$this->assertIsArray($users);
$this->assertGreaterThan(0, count($users));
// Tady bych dal jeste check na zaznam ktery vim ze vzdy existuje
}
}