Skip to content

Commit a900d31

Browse files
authored
Merge pull request #15 from wollanup/steve
update deps
2 parents 894ee04 + 9f3ccb4 commit a900d31

File tree

6 files changed

+521
-328
lines changed

6 files changed

+521
-328
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
language: php
22

33
php:
4-
- 5.6
54
- 7.0
65
- 7.1
76
- hhvm

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
"Util\\": "tests/util/"
2525
}
2626
},
27-
"require": {
28-
"propel/propel": "~2.0@dev",
29-
"wollanup/php-api-rest-interfaces": "^1.1.17"
30-
},
3127
"require-dev": {
32-
"phpunit/phpunit": "^6.0"
28+
"ext-sqlite3": "*",
29+
"wollanup/php-api-rest": "dev-master",
30+
"phpunit/phpunit": "^6.0",
31+
"propel/propel": "~2.0@dev",
32+
"slim/slim": "3.*"
3333
}
3434
}

tests/util/ActionMock.php

Lines changed: 81 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,87 @@
11
<?php
2-
namespace Eukles\Action {
3-
4-
use Eukles\Service\QueryModifier\QueryModifierInterface;
5-
use Propel\Runtime\ActiveQuery\ModelCriteria;
6-
use Psr\Container\ContainerInterface;
7-
use Psr\Http\Message\ResponseInterface;
8-
use Psr\Http\Message\ServerRequestInterface;
9-
10-
class ActionMock implements ActionInterface
11-
{
12-
13-
/**
14-
* ActionInterface constructor.
15-
*
16-
* @param ContainerInterface $c
17-
*/
18-
public function __construct(ContainerInterface $c) { }
19-
20-
/**
21-
* Action factory
22-
*
23-
* @param ContainerInterface $c
24-
*
25-
* @return ActionInterface
26-
*/
27-
public static function create(ContainerInterface $c) { }
28-
29-
/**
30-
* @param QueryModifierInterface $qm
31-
*
32-
* @return ModelCriteria
33-
*/
34-
public function createQuery(QueryModifierInterface $qm = null) { }
35-
36-
/**
37-
* @return ContainerInterface
38-
*/
39-
public function getContainer() { }
40-
41-
/**
42-
* @return ServerRequestInterface
43-
*/
44-
public function getRequest() { }
452

46-
/**
47-
* @return ResponseInterface
48-
*/
49-
public function getResponse() { }
3+
namespace Eukles\Action;
504

51-
/**
52-
* @param ServerRequestInterface $serverRequest
53-
*
54-
* @return ActionInterface
55-
*/
56-
public function setRequest(ServerRequestInterface $serverRequest) { }
5+
use Eukles\Service\QueryModifier\QueryModifierInterface;
6+
use Propel\Runtime\ActiveQuery\ModelCriteria;
7+
use Psr\Container\ContainerInterface;
8+
use Psr\Http\Message\ResponseInterface;
9+
use Psr\Http\Message\ServerRequestInterface;
5710

58-
/**
59-
* @param ResponseInterface $response
60-
*
61-
* @return ActionInterface
62-
*/
63-
public function setResponse(ResponseInterface $response) { }
11+
class ActionMock implements ActionInterface
12+
{
13+
14+
/**
15+
* ActionInterface constructor.
16+
*
17+
* @param ContainerInterface $c
18+
*/
19+
public function __construct(ContainerInterface $c) { }
20+
21+
/**
22+
* Action factory
23+
*
24+
* @param ContainerInterface $c
25+
*
26+
* @return ActionInterface
27+
*/
28+
public static function create(ContainerInterface $c): ActionInterface
29+
{
30+
// TODO: Implement create() method.
31+
}
32+
33+
/**
34+
* @param QueryModifierInterface $qm
35+
*
36+
* @return ModelCriteria
37+
*/
38+
public function createQuery(QueryModifierInterface $qm = null): ModelCriteria
39+
{
40+
// TODO: Implement createQuery() method.
41+
}
42+
43+
/**
44+
* @return ContainerInterface
45+
*/
46+
public function getContainer(): ContainerInterface
47+
{
48+
// TODO: Implement getContainer() method.
49+
}
50+
51+
/**
52+
* @return ServerRequestInterface
53+
*/
54+
public function getRequest(): ServerRequestInterface
55+
{
56+
// TODO: Implement getRequest() method.
57+
}
58+
59+
/**
60+
* @return ResponseInterface
61+
*/
62+
public function getResponse(): ResponseInterface
63+
{
64+
// TODO: Implement getResponse() method.
65+
}
66+
67+
/**
68+
* @param ServerRequestInterface $serverRequest
69+
*
70+
* @return ActionInterface
71+
*/
72+
public function setRequest(ServerRequestInterface $serverRequest): ActionInterface
73+
{
74+
// TODO: Implement setRequest() method.
75+
}
76+
77+
/**
78+
* @param ResponseInterface $response
79+
*
80+
* @return ActionInterface
81+
*/
82+
public function setResponse(ResponseInterface $response): ActionInterface
83+
{
84+
// TODO: Implement setResponse() method.
6485
}
6586
}
87+

tests/util/ContainerMock.php

Lines changed: 87 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,157 @@
11
<?php
22
namespace Eukles\Container {
3-
3+
4+
use Eukles\Config\ConfigInterface;
45
use Eukles\Entity\EntityFactoryInterface;
56
use Eukles\Service\Pagination\RequestPaginationInterface;
67
use Eukles\Service\QueryModifier\RequestQueryModifierInterface;
78
use Eukles\Service\ResponseBuilder\ResponseBuilderInterface;
89
use Eukles\Service\ResponseFormatter\ResponseFormatterInterface;
910
use Eukles\Service\RoutesClasses\RoutesClassesInterface;
10-
use Eukles\Service\XssCleaner\XssCleanerInterface;
1111
use Eukles\Slim\Handlers\ActionErrorInterface;
1212
use Eukles\Slim\Handlers\EntityRequestErrorInterface;
13-
use Slim\Http\Request;
14-
use Slim\Interfaces\RouterInterface;
15-
13+
use Psr\Container\ContainerExceptionInterface;
14+
use Psr\Container\NotFoundExceptionInterface;
15+
use Psr\Http\Message\ResponseInterface;
16+
use Psr\Http\Message\ServerRequestInterface;
17+
1618
class ContainerMock implements ContainerInterface
1719
{
18-
20+
1921
/**
2022
* @inheritdoc
2123
*/
22-
public function get($id) { }
23-
24+
public function has($id) { }
25+
2426
/**
2527
* @return ActionErrorInterface
2628
*/
27-
public function getActionErrorHandler()
29+
public function getActionErrorHandler(): ActionErrorInterface
30+
{
31+
// TODO: Implement getActionErrorHandler() method.
32+
}
33+
34+
/**
35+
* @return ConfigInterface
36+
*/
37+
public function getConfig(): ConfigInterface
2838
{
39+
// TODO: Implement getConfig() method.
2940
}
30-
41+
3142
/**
3243
* @return EntityFactoryInterface
3344
*/
34-
public function getEntityFactory()
45+
public function getEntityFactory(): EntityFactoryInterface
3546
{
47+
// TODO: Implement getEntityFactory() method.
3648
}
37-
49+
3850
/**
3951
* @return EntityRequestErrorInterface
4052
*/
41-
public function getEntityRequestErrorHandler()
53+
public function getEntityRequestErrorHandler(): EntityRequestErrorInterface
4254
{
55+
// TODO: Implement getEntityRequestErrorHandler() method.
4356
}
44-
57+
4558
/**
46-
* @return Request
59+
* @return ServerRequestInterface
4760
*/
48-
public function getRequest()
61+
public function getRequest(): ServerRequestInterface
4962
{
63+
// TODO: Implement getRequest() method.
5064
}
51-
65+
5266
/**
5367
* @return RequestPaginationInterface
5468
*/
55-
public function getRequestPagination()
69+
public function getRequestPagination(): RequestPaginationInterface
5670
{
71+
// TODO: Implement getRequestPagination() method.
5772
}
58-
73+
5974
/**
6075
* @return RequestQueryModifierInterface
6176
*/
62-
public function getRequestQueryModifier()
77+
public function getRequestQueryModifier(): RequestQueryModifierInterface
6378
{
79+
// TODO: Implement getRequestQueryModifier() method.
6480
}
65-
81+
82+
/**
83+
* @return ResponseInterface
84+
*/
85+
public function getResponse(): ResponseInterface
86+
{
87+
// TODO: Implement getResponse() method.
88+
}
89+
6690
/**
6791
* @return ResponseBuilderInterface
6892
*/
69-
public function getResponseBuilder()
93+
public function getResponseBuilder(): ResponseBuilderInterface
7094
{
95+
// TODO: Implement getResponseBuilder() method.
7196
}
72-
97+
7398
/**
7499
* @return ResponseFormatterInterface
75100
*/
76-
public function getResponseFormatter()
101+
public function getResponseFormatter(): ResponseFormatterInterface
77102
{
103+
// TODO: Implement getResponseFormatter() method.
78104
}
79-
105+
80106
/**
81-
* @return RouterInterface
107+
* Result is populated in ActionStrategy and becomes available in middlewares post-app
108+
*
109+
* @return mixed
82110
*/
83-
public function getRouter()
111+
public function getResult()
84112
{
113+
// TODO: Implement getResult() method.
85114
}
86-
115+
87116
/**
88-
* @return RoutesClassesInterface
117+
* @param $result
118+
*
119+
* @return void
89120
*/
90-
public function getRoutesClasses()
121+
public function setResult($result)
91122
{
123+
// TODO: Implement setResult() method.
92124
}
93-
125+
94126
/**
95-
* @return XssCleanerInterface
127+
* @return \Eukles\Service\Router\RouterInterface
96128
*/
97-
public function getXssCleaner()
129+
public function getRouter(): \Eukles\Service\Router\RouterInterface
98130
{
131+
// TODO: Implement getRouter() method.
99132
}
100-
133+
101134
/**
102-
* @inheritdoc
135+
* @return RoutesClassesInterface
103136
*/
104-
public function has($id) { }
137+
public function getRoutesClasses(): RoutesClassesInterface
138+
{
139+
// TODO: Implement getRoutesClasses() method.
140+
}
141+
142+
/**
143+
* Finds an entry of the container by its identifier and returns it.
144+
*
145+
* @param string $id Identifier of the entry to look for.
146+
*
147+
* @throws NotFoundExceptionInterface No entry was found for **this** identifier.
148+
* @throws ContainerExceptionInterface Error while retrieving the entry.
149+
*
150+
* @return mixed Entry.
151+
*/
152+
public function get($id)
153+
{
154+
// TODO: Implement get() method.
155+
}
105156
}
106157
}

0 commit comments

Comments
 (0)