File tree Expand file tree Collapse file tree 3 files changed +17
-52
lines changed Expand file tree Collapse file tree 3 files changed +17
-52
lines changed Original file line number Diff line number Diff line change 1+ # Global configs, only add new or override existing
Original file line number Diff line number Diff line change 1- # php -sdk
1+ # Laravel -sdk
22
3+ [ ![ Scrutinizer Code Quality] ( https://scrutinizer-ci.com/g/nstack-io/laravel-sdk/badges/quality-score.png?b=master )] ( https://scrutinizer-ci.com/g/nstack-io/laravel-sdk/?branch=master )
4+ [ ![ Code Coverage] ( https://scrutinizer-ci.com/g/nstack-io/laravel-sdk/badges/coverage.png?b=master )] ( https://scrutinizer-ci.com/g/nstack-io/laravel-sdk/?branch=master )
5+ [ ![ Build Status] ( https://scrutinizer-ci.com/g/nstack-io/laravel-sdk/badges/build.png?b=master )] ( https://scrutinizer-ci.com/g/nstack-io/laravel-sdk/build-status/master )
6+ [ ![ Code Intelligence Status] ( https://scrutinizer-ci.com/g/nstack-io/laravel-sdk/badges/code-intelligence.svg?b=master )] ( https://scrutinizer-ci.com/code-intelligence )
37
48## 📝 Introduction
59
@@ -71,12 +75,23 @@ or via global function
7175nstack()->getContinentsClient()->index()
7276```
7377
78+
7479or via integration with ` trans() ` [ helper] ( https://laravel.com/docs/5.8/helpers#method-trans )
7580
7681``` php
7782echo trans('messages.welcome');
7883```
7984
85+
86+ All the basic fuctionality can be found in the php-sdk
87+
88+ ## Features
89+
90+ [x] Register php-sdk in laravel provider, with Facade and global func
91+ [x] Translate provider for localization using laravels global func: trans(key)
92+
93+ [ Link here] ( https://github.com/nstack-io/php-sdk )
94+
8095All PHP functionality can be found
8196
8297[ Link] ( https://github.com/nstack-io/php-sdk )
Original file line number Diff line number Diff line change 22
33namespace NStack \Tests ;
44
5- use GuzzleHttp \Client ;
6- use GuzzleHttp \Psr7 \Response ;
7- use NStack \Config ;
8-
95class TestCase extends \PHPUnit \Framework \TestCase
106{
11-
12- <<<<<<< HEAD
13- =======
14- return json_decode ($ content , true );
15- }
16-
17- /**
18- * getClientWithMockedGet
19- *
20- * @param string $filename
21- * @return \GuzzleHttp\Client
22- * @author Casper Rasmussen <[email protected] > 23- */
24- protected function getClientWithMockedGet (string $ filename ): Client
25- {
26- $ response = new Response (200 , ['Content-Type ' => 'application/json ' ],
27- $ this ->getMockAsString ($ filename ));
28-
29- $ guzzle = \Mockery::mock (\GuzzleHttp \Client::class);
30- $ guzzle ->shouldReceive ('get ' )->once ()->andReturn ($ response );
31-
32- return $ guzzle ;
33- }
34-
35- /**
36- * getMockAsString
37- *
38- * @param string $fileName
39- * @return string
40- * @author Casper Rasmussen <[email protected] > 41- */
42- protected function getMockAsString (string $ fileName ): string
43- {
44- return file_get_contents (getcwd () . '/tests/mocks/ ' . $ fileName );
45- }
46-
47- /**
48- * getConfig
49- *
50- * @return \NStack\Config
51- * @author Casper Rasmussen <[email protected] > 52- */
53- public function getConfig (): Config
54- {
55- return new Config ('' , '' );
56- }
57- >>>>>>> b56de27aae2dc30889c6f76338addbf1962027e9
587}
You can’t perform that action at this time.
0 commit comments