Skip to content

Commit 232ebb7

Browse files
authored
Port changes from upstream to support bbb version (#104)
* Port changes from upstream to support bbb version * Fix error in test
1 parent 7bc91a9 commit 232ebb7

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

src/Responses/ApiVersionResponse.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,20 @@ public function getVersion()
3131
{
3232
return $this->rawXml->version->__toString();
3333
}
34+
35+
/**
36+
* @return string
37+
*/
38+
public function getApiVersion()
39+
{
40+
return $this->rawXml->apiVersion->__toString();
41+
}
42+
43+
/**
44+
* @return string
45+
*/
46+
public function getBbbVersion()
47+
{
48+
return $this->rawXml->bbbVersion->__toString();
49+
}
3450
}

tests/fixtures/api_version.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<response>
22
<returncode>SUCCESS</returncode>
33
<version>2.0</version>
4+
<apiVersion>2.0</apiVersion>
5+
<bbbVersion>2.4-rc-7</bbbVersion>s
46
</response>

tests/unit/Responses/ApiVersionResponseTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ public function testApiVersionResponseContent()
4141
{
4242
$this->assertEquals('SUCCESS', $this->version->getReturnCode());
4343
$this->assertEquals('2.0', $this->version->getVersion());
44+
$this->assertEquals('2.0', $this->version->getApiVersion());
45+
$this->assertEquals('2.4-rc-7', $this->version->getBbbVersion());
4446
}
4547

4648
public function testApiVersionResponseTypes()
4749
{
48-
$this->assertEachGetterValueIsString($this->version, ['getReturnCode', 'getVersion']);
50+
$this->assertEachGetterValueIsString($this->version, ['getReturnCode', 'getVersion', 'getApiVersion', 'getBbbVersion']);
4951
}
5052
}

0 commit comments

Comments
 (0)