Skip to content

Commit 6d268b2

Browse files
committed
Add BigBlueButtonGuzzleTest.
1 parent 9f658c1 commit 6d268b2

2 files changed

Lines changed: 54 additions & 1 deletion

File tree

tests/BigBlueButtonGuzzleTest.php

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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;
22+
23+
use GuzzleHttp\Client;
24+
use GuzzleHttp\Psr7\HttpFactory;
25+
26+
/**
27+
* Class BigBlueButtonGuzzleTest.
28+
*
29+
* This test verifies that all the functionality that works with curl also works
30+
* with an injected http client. In this case, we use Guzzle.
31+
*
32+
* @internal
33+
*/
34+
class BigBlueButtonGuzzleTest extends BigBlueButtonTest
35+
{
36+
/**
37+
* Setup test class.
38+
*/
39+
public function setUp(): void
40+
{
41+
parent::setUp();
42+
43+
$client = new Client();
44+
$factory = new HttpFactory();
45+
$this->bbb = BigBlueButton::createWithHttpClient(
46+
$client,
47+
$factory,
48+
$factory,
49+
getenv('BBB_SERVER_BASE_URL') ?: $this->fail(),
50+
getenv('BBB_SECRET') ?: getenv('BBB_SECURITY_SALT') ?: $this->fail(),
51+
);
52+
}
53+
}

tests/BigBlueButtonTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
*/
4747
class BigBlueButtonTest extends TestCase
4848
{
49-
private BigBlueButton $bbb;
49+
protected BigBlueButton $bbb;
5050

5151
/**
5252
* Setup test class.

0 commit comments

Comments
 (0)