Skip to content

Commit 788aeb3

Browse files
committed
Add FixturesGuzzleTest.
1 parent 6983c33 commit 788aeb3

File tree

2 files changed

+50
-1
lines changed

2 files changed

+50
-1
lines changed

tests/Util/FixturesGuzzleTest.php

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?php
2+
3+
/*
4+
* BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
5+
*
6+
* Copyright (c) 2016-2025 BigBlueButton Inc. and by respective authors (see below).
7+
*
8+
* This program is free software; you can redistribute it and/or modify it under the
9+
* terms of the GNU Lesser General Public License as published by the Free Software
10+
* Foundation; either version 3.0 of the License, or (at your option) any later
11+
* version.
12+
*
13+
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
14+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15+
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Lesser General Public License along
18+
* with BigBlueButton; if not, see <https://www.gnu.org/licenses/>.
19+
*/
20+
21+
namespace BigBlueButton\Util;
22+
23+
use BigBlueButton\BigBlueButton;
24+
use GuzzleHttp\Client;
25+
use GuzzleHttp\Psr7\HttpFactory;
26+
27+
/**
28+
* This test verifies that all the functionality that works with curl also works
29+
* with an injected http client. In this case, we use Guzzle.
30+
*
31+
* @internal
32+
*/
33+
class FixturesGuzzleTest extends FixturesTest
34+
{
35+
public function setUp(): void
36+
{
37+
$client = new Client();
38+
$factory = new HttpFactory();
39+
$this->bbb = BigBlueButton::createWithHttpClient(
40+
$client,
41+
$factory,
42+
$factory,
43+
getenv('BBB_SERVER_BASE_URL') ?: $this->fail(),
44+
getenv('BBB_SECRET') ?: getenv('BBB_SECURITY_SALT') ?: $this->fail(),
45+
);
46+
47+
parent::setUp();
48+
}
49+
}

tests/Util/FixturesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
*/
4444
class FixturesTest extends TestCase
4545
{
46-
private BigBlueButton $bbb;
46+
protected BigBlueButton $bbb;
4747
private Fixtures $fixtures;
4848

4949
private static Generator $faker;

0 commit comments

Comments
 (0)