@@ -10,17 +10,17 @@ discard block |
||
10 | 10 | |
11 | 11 | class RotaRepositoryTest extends TestCase |
12 | 12 | { |
13 | - public function getClassName() |
|
13 | + public function getClassName () |
|
14 | 14 | { |
15 | 15 | return 'Rota'; |
16 | 16 | } |
17 | 17 | |
18 | - public function getRepository() |
|
18 | + public function getRepository () |
|
19 | 19 | { |
20 | 20 | return bdRepository($this->getClassName()); |
21 | 21 | } |
22 | 22 | |
23 | - public function getMockObject(array $options = []) |
|
23 | + public function getMockObject (array $options = [ ]) |
|
24 | 24 | { |
25 | 25 | return $this->getRepository() |
26 | 26 | ->createEntity() |
@@ -28,41 +28,41 @@ discard block |
||
28 | 28 | ->setAlias($this->faker->uuid); |
29 | 29 | } |
30 | 30 | |
31 | - public function getFlushedMockObject(array $options = []) |
|
31 | + public function getFlushedMockObject (array $options = [ ]) |
|
32 | 32 | { |
33 | 33 | return $this->getMockObject($options) |
34 | 34 | ->persist() |
35 | 35 | ->flush(); |
36 | 36 | } |
37 | 37 | |
38 | - public function getMockArray(array $options = []) |
|
38 | + public function getMockArray (array $options = [ ]) |
|
39 | 39 | { |
40 | 40 | return $this->getMockObject($options) |
41 | 41 | ->toArray(); |
42 | 42 | } |
43 | 43 | |
44 | - public function getFlushedMockArray(array $options = []) |
|
44 | + public function getFlushedMockArray (array $options = [ ]) |
|
45 | 45 | { |
46 | 46 | return $this->getFlushedMockObject($options) |
47 | 47 | ->toArray(); |
48 | 48 | } |
49 | 49 | |
50 | - public function testGetEntityManager() |
|
50 | + public function testGetEntityManager () |
|
51 | 51 | { |
52 | 52 | $this->assertInstanceOf(EntityManager::class, $this->getRepository()->getEntityManager()); |
53 | 53 | } |
54 | 54 | |
55 | - public function testGetClassMetadata() |
|
55 | + public function testGetClassMetadata () |
|
56 | 56 | { |
57 | 57 | $this->assertInstanceOf(ClassMetadata::class, $this->getRepository()->getClassMetadata()); |
58 | 58 | } |
59 | 59 | |
60 | - public function testCreateQueryWorker() |
|
60 | + public function testCreateQueryWorker () |
|
61 | 61 | { |
62 | 62 | $this->assertInstanceOf(QueryWorker::class, $this->getRepository()->createQueryWorker()); |
63 | 63 | } |
64 | 64 | |
65 | - public function testFindAll() |
|
65 | + public function testFindAll () |
|
66 | 66 | { |
67 | 67 | $entity = $this->getFlushedMockObject(); |
68 | 68 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | ->getResult(); |
72 | 72 | |
73 | 73 | $this->assertGreaterThan(0, $result->count()); |
74 | - $this->assertInstanceOf($this->getRepository()->getClassName(), $result[0]); |
|
74 | + $this->assertInstanceOf($this->getRepository()->getClassName(), $result[ 0 ]); |
|
75 | 75 | |
76 | 76 | $filteredResultById = $result->filter(function ($element) use ($entity) { |
77 | 77 | return $element->getId() === $entity->getId(); |
@@ -86,19 +86,19 @@ discard block |
||
86 | 86 | $this->assertEquals(0, $filteredResultByDeletedAt->count()); |
87 | 87 | } |
88 | 88 | |
89 | - public function testFindOneBy() |
|
89 | + public function testFindOneBy () |
|
90 | 90 | { |
91 | 91 | $entity = $this->getFlushedMockObject(); |
92 | 92 | |
93 | 93 | $result = $this->getRepository() |
94 | - ->findOneBy(['id' => $entity->getId()]); |
|
94 | + ->findOneBy([ 'id' => $entity->getId() ]); |
|
95 | 95 | |
96 | 96 | $this->assertNotNull($result); |
97 | 97 | $this->assertInstanceOf($this->getRepository()->getClassName(), $result); |
98 | 98 | $this->assertEquals($entity->getId(), $result->getId()); |
99 | 99 | } |
100 | 100 | |
101 | - public function testFind() |
|
101 | + public function testFind () |
|
102 | 102 | { |
103 | 103 | $entity = $this->getFlushedMockObject(); |
104 | 104 | |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $this->assertEquals($entity->getId(), $result->getId()); |
111 | 111 | } |
112 | 112 | |
113 | - public function testFindAllRemoved() |
|
113 | + public function testFindAllRemoved () |
|
114 | 114 | { |
115 | 115 | $entity = $this->getFlushedMockObject() |
116 | 116 | ->remove() |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | ->getResult(); |
122 | 122 | |
123 | 123 | $this->assertGreaterThan(0, $result->count()); |
124 | - $this->assertInstanceOf($this->getRepository()->getClassName(), $result[0]); |
|
124 | + $this->assertInstanceOf($this->getRepository()->getClassName(), $result[ 0 ]); |
|
125 | 125 | |
126 | 126 | $filteredResultById = $result->filter(function ($element) use ($entity) { |
127 | 127 | return $element->getId() === $entity->getId(); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $this->assertEquals(0, $filteredResultByDeletedAt->count()); |
137 | 137 | } |
138 | 138 | |
139 | - public function testFindRemoved() |
|
139 | + public function testFindRemoved () |
|
140 | 140 | { |
141 | 141 | $entity = $this->getFlushedMockObject() |
142 | 142 | ->remove() |
@@ -151,12 +151,12 @@ discard block |
||
151 | 151 | $this->assertInstanceOf(DateTime::class, $result->getDeletedAt()); |
152 | 152 | } |
153 | 153 | |
154 | - public function testCreateEntity() |
|
154 | + public function testCreateEntity () |
|
155 | 155 | { |
156 | 156 | $this->assertInstanceOf($this->getRepository()->getClassName(), $this->getRepository()->createEntity()); |
157 | 157 | } |
158 | 158 | |
159 | - public function testRemove() |
|
159 | + public function testRemove () |
|
160 | 160 | { |
161 | 161 | $entity = $this->getFlushedMockObject(); |
162 | 162 |