Skip to content

Commit 55bc554

Browse files
committed
testimonial modülü aktif edildi.
1 parent 8efa690 commit 55bc554

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

src/SystemApi/Site/Testimonials.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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+
}

src/SystemApi/SiteService.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use SystemApi\Site\Products;
1111
use SystemApi\Site\References;
1212
use SystemApi\Site\Settings;
13+
use SystemApi\Site\Testimonials;
1314

1415
class SiteService extends Service
1516
{
@@ -66,4 +67,10 @@ class SiteService extends Service
6667
* @var References
6768
*/
6869
public $references;
70+
71+
/**
72+
* @Inject
73+
* @var Testimonials
74+
*/
75+
public $testimonials;
6976
}

tests/ServicesTest.php

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,33 @@
22

33
class ServicesTest extends \PHPUnit\Framework\TestCase
44
{
5+
private $token = '';
6+
57
public function testGenel()
68
{
79
$client = new \SystemApi\ApiClient();
810

9-
$client->setBaseUrl('http://backend.ifsistem.app');
10-
$client->setToken('');
11+
$client->setBaseUrl('http://backend.ifsistem.test');
12+
$client->setToken($this->token);
1113
$client->setLangId(1);
1214
$client->setIp('127.0.0.1');
1315

1416
$settings = $client->site->settings->items();
1517

1618
$this->assertTrue(is_object($settings));
1719
}
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+
}
1834
}

0 commit comments

Comments
 (0)