@@ -49,19 +49,19 @@ |
||
49 | 49 | { |
50 | 50 | $mock = $this->getMockBuilder(AddItemFieldset::class) |
51 | 51 | ->setMethods(['setObject', 'add']) |
52 | - ->disableOriginalConstructor()->getMock(); |
|
52 | + ->disableOriginalConstructor()->getMock(); |
|
53 | 53 | |
54 | 54 | $mock->expects($this->once())->method('setObject')->with($this->isInstanceOf(\ArrayObject::class)); |
55 | 55 | |
56 | 56 | $mock->expects($this->exactly(6))->method('add') |
57 | - ->withConsecutive( |
|
57 | + ->withConsecutive( |
|
58 | 58 | [['name' => 'id', 'type' => 'Hidden']], |
59 | 59 | [['name' => 'current', 'type' => 'Hidden']], |
60 | 60 | [['name' => 'do', 'type' => 'Hidden']], |
61 | 61 | [['name' => 'name', 'type' => 'Text', 'options' => ['label' => 'Name'], 'attributes' => ['required' => 'required']]], |
62 | 62 | [['name' => 'value', 'type' => 'Text', 'options' => ['label' => 'Value']]], |
63 | 63 | [['name' => 'priority', 'type' => 'Text']] |
64 | - ); |
|
64 | + ); |
|
65 | 65 | |
66 | 66 | return $mock; |
67 | 67 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | '@testInitializesItself' => 'setupMock' |
38 | 38 | ]; |
39 | 39 | |
40 | - private $inheritance = [ Fieldset::class, ViewPartialProviderInterface::class, InputFilterProviderInterface::class]; |
|
40 | + private $inheritance = [Fieldset::class, ViewPartialProviderInterface::class, InputFilterProviderInterface::class]; |
|
41 | 41 | |
42 | 42 | private $traits = [ViewPartialProviderTrait::class]; |
43 | 43 | |
@@ -77,13 +77,13 @@ discard block |
||
77 | 77 | 'name' => [ |
78 | 78 | 'required' => true, |
79 | 79 | 'filters' => [ |
80 | - [ 'name' => 'StringTrim' ], |
|
80 | + ['name' => 'StringTrim'], |
|
81 | 81 | ], |
82 | 82 | ], |
83 | 83 | 'value' => [ |
84 | 84 | 'required' => false, |
85 | 85 | 'filters' => [ |
86 | - [ 'name' => 'StringTrim' ], |
|
86 | + ['name' => 'StringTrim'], |
|
87 | 87 | ], |
88 | 88 | ], |
89 | 89 | ]; |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | */ |
22 | 22 | protected $target; |
23 | 23 | |
24 | - public function setUp(){ |
|
24 | + public function setUp() { |
|
25 | 25 | $this->target = new SummaryFormButtonsFieldset(); |
26 | 26 | } |
27 | 27 | |
@@ -39,20 +39,20 @@ discard block |
||
39 | 39 | |
40 | 40 | public function testSetGetFormId() |
41 | 41 | { |
42 | - $id=123; |
|
42 | + $id = 123; |
|
43 | 43 | $this->target->setFormId($id); |
44 | - $this->assertSame($this->target->getFormId(), (string)$id); |
|
44 | + $this->assertSame($this->target->getFormId(), (string) $id); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | public function testSetAttribute() |
48 | 48 | { |
49 | - $this->target->setAttribute('id',123); |
|
49 | + $this->target->setAttribute('id', 123); |
|
50 | 50 | $this->assertSame($this->target->getFormId(), "123"); |
51 | 51 | } |
52 | 52 | |
53 | 53 | public function testSetAttributeSomeAttribute() |
54 | 54 | { |
55 | - $this->target->setAttribute('foo','bar'); |
|
55 | + $this->target->setAttribute('foo', 'bar'); |
|
56 | 56 | $this->assertSame($this->target->getFormId(), false); |
57 | 57 | } |
58 | 58 | } |
59 | 59 | \ No newline at end of file |
@@ -31,9 +31,9 @@ |
||
31 | 31 | |
32 | 32 | private $target = MetaDataFieldset::class; |
33 | 33 | |
34 | - private $inheritance = [ Fieldset::class ]; |
|
34 | + private $inheritance = [Fieldset::class]; |
|
35 | 35 | |
36 | 36 | private $properties = [ |
37 | - [ 'hydrator', ['default@' => MetaDataHydrator::class, '@value' => EntityHydrator::class]] |
|
37 | + ['hydrator', ['default@' => MetaDataHydrator::class, '@value' => EntityHydrator::class]] |
|
38 | 38 | ]; |
39 | 39 | } |
40 | 40 | \ No newline at end of file |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | */ |
22 | 22 | protected $target; |
23 | 23 | |
24 | - public function setUp(){ |
|
24 | + public function setUp() { |
|
25 | 25 | $this->target = new DefaultButtonsFieldset(); |
26 | 26 | } |
27 | 27 | |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | } |
33 | 33 | |
34 | 34 | |
35 | - public function testInit(){ |
|
35 | + public function testInit() { |
|
36 | 36 | /*@todo*/ |
37 | 37 | } |
38 | 38 | } |
39 | 39 | \ No newline at end of file |
@@ -32,13 +32,13 @@ |
||
32 | 32 | protected $localeService; |
33 | 33 | |
34 | 34 | /** |
35 | - * @see PHPUnit_Framework_TestCase::setUp() |
|
36 | - */ |
|
37 | - protected function setUp() |
|
38 | - { |
|
39 | - $this->localeService = new LocaleService($this->languages); |
|
35 | + * @see PHPUnit_Framework_TestCase::setUp() |
|
36 | + */ |
|
37 | + protected function setUp() |
|
38 | + { |
|
39 | + $this->localeService = new LocaleService($this->languages); |
|
40 | 40 | |
41 | - } |
|
41 | + } |
|
42 | 42 | |
43 | 43 | public function testGetDefaultLanguage() |
44 | 44 | { |
@@ -37,18 +37,18 @@ discard block |
||
37 | 37 | private $target = [ |
38 | 38 | AjaxUrl::class, |
39 | 39 | [self::BASEPATH], |
40 | - '@testInheritance' => [ 'as_reflection' => true ], |
|
40 | + '@testInheritance' => ['as_reflection' => true], |
|
41 | 41 | '@testConstruction' => false, |
42 | 42 | ]; |
43 | 43 | |
44 | - private $inheritance = [ AbstractHelper::class ]; |
|
44 | + private $inheritance = [AbstractHelper::class]; |
|
45 | 45 | |
46 | 46 | public function testConstruction() |
47 | 47 | { |
48 | 48 | $basepath = '/test/path/no/slash'; |
49 | 49 | $target = new AjaxUrl($basepath); |
50 | 50 | |
51 | - $this->assertAttributeSame($basepath . '/' , 'basePath', $target); |
|
51 | + $this->assertAttributeSame($basepath.'/', 'basePath', $target); |
|
52 | 52 | |
53 | 53 | $basepath = '/test/path/slash/'; |
54 | 54 | $target = new AjaxUrl($basepath); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | { |
76 | 76 | $url = $this->target->__invoke(...$args); |
77 | 77 | |
78 | - $expect = self::BASEPATH . $expect; |
|
78 | + $expect = self::BASEPATH.$expect; |
|
79 | 79 | $this->assertEquals($expect, $url); |
80 | 80 | } |
81 | 81 |
@@ -97,7 +97,7 @@ |
||
97 | 97 | |
98 | 98 | public function testReturnsEmptyString() |
99 | 99 | { |
100 | - $event = $this->args['event']; |
|
100 | + $event = $this->args['event']; |
|
101 | 101 | $event->setName('nothingToDo'); |
102 | 102 | $event->setTarget($this->target); |
103 | 103 |
@@ -38,7 +38,7 @@ |
||
38 | 38 | '@testConstruction' => false, |
39 | 39 | ]; |
40 | 40 | |
41 | - private $inheritance = [ AbstractHelper::class ]; |
|
41 | + private $inheritance = [AbstractHelper::class]; |
|
42 | 42 | |
43 | 43 | private function getTargetArgs() |
44 | 44 | { |
@@ -60,19 +60,19 @@ discard block |
||
60 | 60 | |
61 | 61 | private function injectHelperManager($services = []) |
62 | 62 | { |
63 | - $sm = $this->createServiceManagerMock(); |
|
63 | + $sm = $this->createServiceManagerMock(); |
|
64 | 64 | $manager = $this->createPluginManagerMock($services,$sm); |
65 | 65 | |
66 | 66 | $renderer = $this->getMockBuilder(PhpRenderer::class) |
67 | - ->disableOriginalConstructor() |
|
67 | + ->disableOriginalConstructor() |
|
68 | 68 | ->setMethods(['getHelperPluginManager']) |
69 | 69 | ->getMock() |
70 | 70 | ; |
71 | 71 | |
72 | 72 | $renderer |
73 | - ->expects($this->any()) |
|
74 | - ->method('getHelperPluginManager') |
|
75 | - ->will($this->returnValue($manager)) |
|
73 | + ->expects($this->any()) |
|
74 | + ->method('getHelperPluginManager') |
|
75 | + ->will($this->returnValue($manager)) |
|
76 | 76 | ; |
77 | 77 | |
78 | 78 | $this->target->setView($renderer); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | $options = ['option' => 'value']; |
154 | 154 | $this->injectHelperManager(['helper' => PtHelperDummy::class]); |
155 | 155 | $this->helperManager |
156 | - ->setExpectedCallCount('get', 'helper', $options, 1) |
|
156 | + ->setExpectedCallCount('get', 'helper', $options, 1) |
|
157 | 157 | ; |
158 | 158 | |
159 | 159 | $this->target->plugin('helper', $options); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | ], |
50 | 50 | ]; |
51 | 51 | |
52 | - private $inheritance = [ AbstractHelper::class ]; |
|
52 | + private $inheritance = [AbstractHelper::class]; |
|
53 | 53 | |
54 | 54 | /** |
55 | 55 | * |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | private function injectHelperManager($services = []) |
62 | 62 | { |
63 | 63 | $sm = $this->createServiceManagerMock(); |
64 | - $manager = $this->createPluginManagerMock($services,$sm); |
|
64 | + $manager = $this->createPluginManagerMock($services, $sm); |
|
65 | 65 | |
66 | 66 | $renderer = $this->getMockBuilder(PhpRenderer::class) |
67 | 67 | ->disableOriginalConstructor() |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * @throws \Exception |
93 | 93 | * @dataProvider getTestClearCache |
94 | 94 | */ |
95 | - public function testClearCache($cacheDir, $expectThrow=false, $message='Test Cache Directory') |
|
95 | + public function testClearCache($cacheDir, $expectThrow = false, $message = 'Test Cache Directory') |
|
96 | 96 | { |
97 | 97 | $options = $this->getMockBuilder(ListenerOptions::class) |
98 | 98 | ->disableOriginalConstructor() |
@@ -115,9 +115,9 @@ discard block |
||
115 | 115 | { |
116 | 116 | $cacheDir = sys_get_temp_dir().'/yawik/test-cache'; |
117 | 117 | return [ |
118 | - [null,true,'Test with null cache directory'], |
|
119 | - [sys_get_temp_dir().'/foo',true,'Test with non existent directory'], |
|
120 | - [$cacheDir,false,'Test with valid cache directory'] |
|
118 | + [null, true, 'Test with null cache directory'], |
|
119 | + [sys_get_temp_dir().'/foo', true, 'Test with non existent directory'], |
|
120 | + [$cacheDir, false, 'Test with valid cache directory'] |
|
121 | 121 | ]; |
122 | 122 | } |
123 | 123 |