@@ -21,19 +21,19 @@ |
||
21 | 21 | $this->twigEngine = new TwigEngineMokcup(); |
22 | 22 | $this->service->setTwigEngine($this->twigEngine); |
23 | 23 | $this->service->setModelFieldsParameters(array( |
24 | - "date" => array( "format" => "d-m-y") |
|
24 | + "date" => array( "format" => "d-m-y") |
|
25 | 25 | )); |
26 | 26 | } |
27 | 27 | |
28 | 28 | public function testCustomFieldParameters() { |
29 | - $this->service->generateMarkupForEntity('Test\TestBundle\Model\Person'); |
|
30 | - $fieldsType = array(); |
|
31 | - foreach ($this->twigEngine->renderParameters['fields'] as $field) { |
|
29 | + $this->service->generateMarkupForEntity('Test\TestBundle\Model\Person'); |
|
30 | + $fieldsType = array(); |
|
31 | + foreach ($this->twigEngine->renderParameters['fields'] as $field) { |
|
32 | 32 | if (isset($field['format'])) { |
33 | - $fieldsType[$field['name']] = $field['format']; |
|
33 | + $fieldsType[$field['name']] = $field['format']; |
|
34 | + } |
|
34 | 35 | } |
35 | - } |
|
36 | - $this->assertEquals("d-m-y", $fieldsType['createdAt']); |
|
36 | + $this->assertEquals("d-m-y", $fieldsType['createdAt']); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | public function testEntityProperty() { |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | break; |
261 | 261 | case 'Doctrine\ORM\Mapping\JoinColumns': |
262 | 262 | if (count($annotation->value) > 1) { |
263 | - throw new \Exception('Multiple foreign key is not supported'); |
|
263 | + throw new \Exception('Multiple foreign key is not supported'); |
|
264 | 264 | } |
265 | 265 | $saveField = true; |
266 | 266 | $field['name'] = $this->convertNaming($annotation->value[0]->name); |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | |
285 | 285 | /** Add the ability to override field parameter */ |
286 | 286 | if (isset($this->fieldsParams[$field['type']])) { |
287 | - $field = array_merge($field, $this->fieldsParams[$field['type']]); |
|
287 | + $field = array_merge($field, $this->fieldsParams[$field['type']]); |
|
288 | 288 | } |
289 | 289 | |
290 | 290 | if (!empty($association)) { |