Skip to content

Commit 98c34dd

Browse files
committed
Add test class for component
1 parent 4922067 commit 98c34dd

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

tests/ApiPaginationComponentTest.php

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
namespace BryanCrowe\ApiPagination\Test;
3+
4+
use BryanCrowe\ApiPagination\Controller\Component\ApiPaginationComponent;
5+
use Cake\Controller\ComponentRegistry;
6+
use Cake\Controller\Controller;
7+
use Cake\Network\Request;
8+
use Cake\Network\Response;
9+
use Cake\TestSuite\TestCase;
10+
11+
/**
12+
* ApiPaginationComponentTest class
13+
*/
14+
class ApiPaginationComponentTest extends TestCase
15+
{
16+
public $component = null;
17+
public $controller = null;
18+
19+
/**
20+
* setUp method
21+
*
22+
* @return void
23+
*/
24+
public function setUp()
25+
{
26+
parent::setUp();
27+
28+
$request = new Request();
29+
$response = new Response();
30+
$this->controller = new Controller($request, $response);
31+
$registry = new ComponentRegistry($this->controller);
32+
$this->component = new ApiPaginationComponent($registry);
33+
}
34+
35+
/**
36+
* tearDown method
37+
*
38+
* @return void
39+
*/
40+
public function tearDown()
41+
{
42+
parent::tearDown();
43+
44+
unset($this->component, $this->controller);
45+
}
46+
47+
public function testTrue()
48+
{
49+
$this->assertTrue(true);
50+
}
51+
}

0 commit comments

Comments
 (0)