Code Duplication    Length = 39-39 lines in 2 locations

tests/Tests/PluginTest.php 1 location

@@ 7-45 (lines=39) @@
4
5
use WPApi\WPApi;
6
7
class PluginTest extends \PHPUnit_Framework_TestCase
8
{
9
    protected $plugin;
10
11
    public function testAuthor()
12
    {
13
        $response = $this->plugin->author('Ryuhei Yokokawa');
14
        $this->assertInstanceOf('WPApi\\Model\\Collection', $response);
15
    }
16
17
    public function testBrowse()
18
    {
19
        $response = $this->plugin->browse('new');
20
        $this->assertInstanceOf('WPApi\\Model\\Collection', $response);
21
    }
22
23
    public function testSearch()
24
    {
25
        $response = $this->plugin->search('wordpress seo');
26
        $this->assertInstanceOf('WPApi\\Model\\Collection', $response);
27
    }
28
29
    public function testSlug()
30
    {
31
        $response = $this->plugin->slug('wordpress-seo');
32
        $this->assertInstanceOf('WPApi\\Model\\Plugin', $response);
33
    }
34
35
    public function testTag()
36
    {
37
        $response = $this->plugin->tag('seo');
38
        $this->assertInstanceOf('WPApi\\Model\\Collection', $response);
39
    }
40
41
    public function setup()
42
    {
43
        $this->plugin = WPApi::plugin();
44
    }
45
}

tests/Tests/ThemeTest.php 1 location

@@ 7-45 (lines=39) @@
4
5
use WPApi\WPApi;
6
7
class ThemeTest extends \PHPUnit_Framework_TestCase
8
{
9
    protected $theme;
10
11
    public function testAuthor()
12
    {
13
        $response = $this->theme->author('fontethemes');
14
        $this->assertInstanceOf('WPApi\\Model\\Collection', $response);
15
    }
16
17
    public function testBrowse()
18
    {
19
        $response = $this->theme->browse('new');
20
        $this->assertInstanceOf('WPApi\\Model\\Collection', $response);
21
    }
22
23
    public function testSearch()
24
    {
25
        $response = $this->theme->search('simple');
26
        $this->assertInstanceOf('WPApi\\Model\\Collection', $response);
27
    }
28
29
    public function testSlug()
30
    {
31
        $response = $this->theme->slug('simpler');
32
        $this->assertInstanceOf('WPApi\\Model\\Theme', $response);
33
    }
34
35
    public function testTag()
36
    {
37
        $response = $this->theme->tag('simple');
38
        $this->assertInstanceOf('WPApi\\Model\\Collection', $response);
39
    }
40
41
    public function setup()
42
    {
43
        $this->theme = WPApi::theme();
44
    }
45
}