forked from joomla-framework/github-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFeedsTest.php
More file actions
60 lines (51 loc) · 1.27 KB
/
FeedsTest.php
File metadata and controls
60 lines (51 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
/**
* @copyright Copyright (C) 2005 - 2022 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
namespace Joomla\Github\Tests;
use Joomla\Github\Package\Activity\Feeds;
use Joomla\Github\Tests\Stub\GitHubTestCase;
/**
* Test class for the GitHub API package.
*
* @since 1.4.0
*/
class FeedsTest extends GitHubTestCase
{
/**
* @var Feeds Object under test.
* @since 1.4.0
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @since 1.4.0
*
* @return void
*/
protected function setUp(): void
{
parent::setUp();
$this->object = new Feeds($this->options, $this->client);
}
/**
* Tests the getFeeds method
*
* @return void
*/
public function testGetFeeds()
{
$this->client->expects($this->once())
->method('get')
->with('/feeds')
->willReturn($this->response);
$response = json_decode((string) $this->response->getBody());
$this->assertEquals(
$response,
$this->object->getFeeds()
);
}
}