File tree Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Expand file tree Collapse file tree 3 files changed +36
-2
lines changed Original file line number Diff line number Diff line change
1
+ <?php namespace SystemApi \Site ;
2
+
3
+ use SystemApi \Base \Service ;
4
+
5
+ class Testimonials extends Service
6
+ {
7
+ public function items ($ data = null )
8
+ {
9
+ return $ this ->c ->backend ->get ('/site/testimonials/items ' , $ data );
10
+ }
11
+ }
Original file line number Diff line number Diff line change 10
10
use SystemApi \Site \Products ;
11
11
use SystemApi \Site \References ;
12
12
use SystemApi \Site \Settings ;
13
+ use SystemApi \Site \Testimonials ;
13
14
14
15
class SiteService extends Service
15
16
{
@@ -66,4 +67,10 @@ class SiteService extends Service
66
67
* @var References
67
68
*/
68
69
public $ references ;
70
+
71
+ /**
72
+ * @Inject
73
+ * @var Testimonials
74
+ */
75
+ public $ testimonials ;
69
76
}
Original file line number Diff line number Diff line change 2
2
3
3
class ServicesTest extends \PHPUnit \Framework \TestCase
4
4
{
5
+ private $ token = '' ;
6
+
5
7
public function testGenel ()
6
8
{
7
9
$ client = new \SystemApi \ApiClient ();
8
10
9
- $ client ->setBaseUrl ('http://backend.ifsistem.app ' );
10
- $ client ->setToken ('' );
11
+ $ client ->setBaseUrl ('http://backend.ifsistem.test ' );
12
+ $ client ->setToken ($ this -> token );
11
13
$ client ->setLangId (1 );
12
14
$ client ->setIp ('127.0.0.1 ' );
13
15
14
16
$ settings = $ client ->site ->settings ->items ();
15
17
16
18
$ this ->assertTrue (is_object ($ settings ));
17
19
}
20
+
21
+ public function testTestimonials ()
22
+ {
23
+ $ client = new \SystemApi \ApiClient ();
24
+
25
+ $ client ->setBaseUrl ('http://backend.ifsistem.test ' );
26
+ $ client ->setToken ($ this ->token );
27
+ $ client ->setLangId (1 );
28
+ $ client ->setIp ('127.0.0.1 ' );
29
+
30
+ $ items = $ client ->site ->testimonials ->items ();
31
+
32
+ $ this ->assertTrue (is_object ($ items ));
33
+ }
18
34
}
You can’t perform that action at this time.
0 commit comments