From f292f90c8ed6290ab6ad6bc77ad5fe717dd4f69a Mon Sep 17 00:00:00 2001 From: dereuromark Date: Wed, 2 Nov 2016 01:59:35 +0100 Subject: [PATCH] Fix CS. --- tests/TestCase/ORM/EntityTest.php | 18 +++++++++--------- tests/TestCase/ORM/TableTest.php | 8 ++++---- tests/TestCase/View/Form/EntityContextTest.php | 2 +- tests/TestCase/View/Helper/FormHelperTest.php | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/TestCase/ORM/EntityTest.php b/tests/TestCase/ORM/EntityTest.php index 679881d95a2..7e0c3a0169c 100644 --- a/tests/TestCase/ORM/EntityTest.php +++ b/tests/TestCase/ORM/EntityTest.php @@ -32,7 +32,7 @@ class EntityTest extends TestCase */ public function testSetOneParamNoSetters() { - $entity = new Entity; + $entity = new Entity(); $this->assertNull($entity->getOriginal('foo')); $entity->set('foo', 'bar'); $this->assertEquals('bar', $entity->foo); @@ -55,7 +55,7 @@ public function testSetOneParamNoSetters() */ public function testSetMultiplePropertiesNoSetters() { - $entity = new Entity; + $entity = new Entity(); $entity->accessible('*', true); $entity->set(['foo' => 'bar', 'id' => 1]); @@ -376,7 +376,7 @@ public function testGetCamelCasedProperties() */ public function testMagicSet() { - $entity = new Entity; + $entity = new Entity(); $entity->name = 'Jones'; $this->assertEquals('Jones', $entity->name); $entity->name = 'George'; @@ -476,7 +476,7 @@ public function testMagicGetWithGetterTitleCase() */ public function testIndirectModification() { - $entity = new Entity; + $entity = new Entity(); $entity->things = ['a', 'b']; $entity->things[] = 'c'; $this->assertEquals(['a', 'b', 'c'], $entity->things); @@ -1052,7 +1052,7 @@ public function testToArrayVirtualProperties() */ public function testErrors() { - $entity = new Entity; + $entity = new Entity(); $this->assertEmpty($entity->errors()); $this->assertSame($entity, $entity->errors('foo', 'bar')); $this->assertEquals(['bar'], $entity->errors('foo')); @@ -1189,7 +1189,7 @@ public function testCleanRemovesErrors() */ public function testAccessible() { - $entity = new Entity; + $entity = new Entity(); $entity->accessible('*', false); $this->assertFalse($entity->accessible('foo')); $this->assertFalse($entity->accessible('bar')); @@ -1218,7 +1218,7 @@ public function testAccessible() */ public function testAccessibleAsArray() { - $entity = new Entity; + $entity = new Entity(); $entity->accessible(['foo', 'bar', 'baz'], true); $this->assertTrue($entity->accessible('foo')); $this->assertTrue($entity->accessible('bar')); @@ -1242,7 +1242,7 @@ public function testAccessibleAsArray() */ public function testAccessibleWildcard() { - $entity = new Entity; + $entity = new Entity(); $entity->accessible(['foo', 'bar', 'baz'], true); $this->assertTrue($entity->accessible('foo')); $this->assertTrue($entity->accessible('bar')); @@ -1374,7 +1374,7 @@ public function testDebugInfo() */ public function testSource() { - $entity = new Entity; + $entity = new Entity(); $this->assertNull($entity->source()); $entity->source('foos'); $this->assertEquals('foos', $entity->source()); diff --git a/tests/TestCase/ORM/TableTest.php b/tests/TestCase/ORM/TableTest.php index 072974b3fb5..19daeb6455c 100644 --- a/tests/TestCase/ORM/TableTest.php +++ b/tests/TestCase/ORM/TableTest.php @@ -5179,7 +5179,7 @@ public function testGet($options) ->setConstructorArgs([$this->connection, $table]) ->getMock(); - $entity = new Entity; + $entity = new Entity(); $table->expects($this->once())->method('query') ->will($this->returnValue($query)); $table->expects($this->once())->method('callFinder') @@ -5229,7 +5229,7 @@ public function testGetWithCustomFinder($options) ->setConstructorArgs([$this->connection, $table]) ->getMock(); - $entity = new Entity; + $entity = new Entity(); $table->expects($this->once())->method('query') ->will($this->returnValue($query)); $table->expects($this->once())->method('callFinder') @@ -5289,7 +5289,7 @@ public function testGetWithCache($options, $cacheKey, $cacheConfig) ->setConstructorArgs([$this->connection, $table]) ->getMock(); - $entity = new Entity; + $entity = new Entity(); $table->expects($this->once())->method('query') ->will($this->returnValue($query)); $table->expects($this->once())->method('callFinder') @@ -5378,7 +5378,7 @@ public function testPatchEntity() $table->expects($this->once())->method('marshaller') ->will($this->returnValue($marshaller)); - $entity = new Entity; + $entity = new Entity(); $data = ['foo' => 'bar']; $marshaller->expects($this->once()) ->method('merge') diff --git a/tests/TestCase/View/Form/EntityContextTest.php b/tests/TestCase/View/Form/EntityContextTest.php index 9c9ed0c4288..acd45069ba3 100644 --- a/tests/TestCase/View/Form/EntityContextTest.php +++ b/tests/TestCase/View/Form/EntityContextTest.php @@ -182,7 +182,7 @@ public function testDefaultEntityError() */ public function testTableFromEntitySource() { - $entity = new Entity; + $entity = new Entity(); $entity->source('Articles'); $context = new EntityContext($this->request, [ 'entity' => $entity, diff --git a/tests/TestCase/View/Helper/FormHelperTest.php b/tests/TestCase/View/Helper/FormHelperTest.php index 7175608bce3..a93ce486505 100644 --- a/tests/TestCase/View/Helper/FormHelperTest.php +++ b/tests/TestCase/View/Helper/FormHelperTest.php @@ -2684,8 +2684,8 @@ public function testFormValidationAssociatedSecondLevel() */ public function testFormValidationMultiRecord() { - $one = new Entity; - $two = new Entity; + $one = new Entity(); + $two = new Entity(); TableRegistry::get('Contacts', [ 'className' => __NAMESPACE__ . '\ContactsTable' ]);