@@ -28,12 +28,12 @@ |
||
28 | 28 | $this->builder = new Builder(); |
29 | 29 | |
30 | 30 | $this->builder |
31 | - ->setIssuer(gethostname()) |
|
32 | - ->setId(time(), true); |
|
33 | - // ->setIssuedAt(time()) |
|
34 | - // ->setNotBefore(time() + 60) |
|
35 | - // ->setExpiration(time() + 3600) |
|
36 | - // ->set('teste', 1); |
|
31 | + ->setIssuer(gethostname()) |
|
32 | + ->setId(time(), true); |
|
33 | + // ->setIssuedAt(time()) |
|
34 | + // ->setNotBefore(time() + 60) |
|
35 | + // ->setExpiration(time() + 3600) |
|
36 | + // ->set('teste', 1); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
@@ -15,8 +15,8 @@ discard block |
||
15 | 15 | $entity = $this->getMockObject($except); |
16 | 16 | |
17 | 17 | $this->getRepository() |
18 | - ->save($entity) |
|
19 | - ->flush($entity); |
|
18 | + ->save($entity) |
|
19 | + ->flush($entity); |
|
20 | 20 | |
21 | 21 | return $entity; |
22 | 22 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $entity = $this->getFlushedMockObject(); |
88 | 88 | |
89 | 89 | $repository->remove($entity) |
90 | - ->flush($entity); |
|
90 | + ->flush($entity); |
|
91 | 91 | |
92 | 92 | $repository->find($entity->getId()); |
93 | 93 | } |
@@ -82,8 +82,8 @@ discard block |
||
82 | 82 | public function prePersist() |
83 | 83 | { |
84 | 84 | $this->getRepository() |
85 | - ->preSave($this) |
|
86 | - ->validate($this); |
|
85 | + ->preSave($this) |
|
86 | + ->validate($this); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
@@ -92,8 +92,8 @@ discard block |
||
92 | 92 | public function preUpdate() |
93 | 93 | { |
94 | 94 | $this->getRepository() |
95 | - ->preSave($this) |
|
96 | - ->validate($this); |
|
95 | + ->preSave($this) |
|
96 | + ->validate($this); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | public function getRepository() |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | trait ReadTrait |
6 | 6 | { |
7 | - public function findAll(array $filters = null) |
|
7 | + public function findAll(array $filters = null) |
|
8 | 8 | { |
9 | 9 | return $this->mainRepository->findAll()->withFilters($filters); |
10 | 10 | } |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | trait DeleteTrait |
6 | 6 | { |
7 | - public function remove($id) |
|
7 | + public function remove($id) |
|
8 | 8 | { |
9 | 9 | return $this->mainRepository |
10 | 10 | ->find($id) |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | trait UpdateTrait |
6 | 6 | { |
7 | - public function update($id, array $data) |
|
7 | + public function update($id, array $data) |
|
8 | 8 | { |
9 | 9 | $entity = $this->mainRepository->find($id); |
10 | 10 |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | trait CreateTrait |
6 | 6 | { |
7 | - public function store(array $data) |
|
7 | + public function store(array $data) |
|
8 | 8 | { |
9 | 9 | $entity = $this->mainRepository->createEntity(); |
10 | 10 |
@@ -4,11 +4,11 @@ discard block |
||
4 | 4 | |
5 | 5 | trait ReadTrait |
6 | 6 | { |
7 | - public function testFindAll() |
|
7 | + public function testFindAll() |
|
8 | 8 | { |
9 | 9 | $entity = $this->getService() |
10 | - ->store($this->getRepositoryTest()->getMockArray()) |
|
11 | - ->flush(); |
|
10 | + ->store($this->getRepositoryTest()->getMockArray()) |
|
11 | + ->flush(); |
|
12 | 12 | |
13 | 13 | $findAll = $this->getService()->findAll()->getResult(); |
14 | 14 | |
@@ -16,11 +16,11 @@ discard block |
||
16 | 16 | $this->assertInstanceOf($this->getService()->getMainRepository()->getEntityName(), $findAll[0]); |
17 | 17 | } |
18 | 18 | |
19 | - public function testFind() |
|
19 | + public function testFind() |
|
20 | 20 | { |
21 | 21 | $entity = $this->getService() |
22 | - ->store($this->getRepositoryTest()->getMockArray()) |
|
23 | - ->flush(); |
|
22 | + ->store($this->getRepositoryTest()->getMockArray()) |
|
23 | + ->flush(); |
|
24 | 24 | |
25 | 25 | $find = $this->getService()->find($entity->getId()); |
26 | 26 |
@@ -4,18 +4,18 @@ |
||
4 | 4 | |
5 | 5 | trait DeleteTrait |
6 | 6 | { |
7 | - /** |
|
7 | + /** |
|
8 | 8 | * @expectedException Symfony\Component\HttpKernel\Exception\NotFoundHttpException |
9 | 9 | */ |
10 | 10 | public function testRemove() |
11 | 11 | { |
12 | 12 | $entity = $this->getService() |
13 | - ->store($this->getRepositoryTest()->getMockArray()) |
|
14 | - ->flush(); |
|
13 | + ->store($this->getRepositoryTest()->getMockArray()) |
|
14 | + ->flush(); |
|
15 | 15 | |
16 | 16 | $this->getService() |
17 | - ->remove($entity->getId()) |
|
18 | - ->flush(); |
|
17 | + ->remove($entity->getId()) |
|
18 | + ->flush(); |
|
19 | 19 | |
20 | 20 | $find = $this->getService()->getMainRepository()->find($entity->getId()); |
21 | 21 | } |