diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml deleted file mode 100644 index a79757b..0000000 --- a/.github/workflows/coding-standard.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Coding Standard - -on: - # Run on all pushes and on all pull requests. - push: - branches: - master - pull_request: - # Allow manually triggering the workflow. - workflow_dispatch: - -jobs: - test: - uses: "zetacomponents/.github/.github/workflows/coding-standard.yml@master" diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 6cf1a5b..365cd4d 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,14 +1,13 @@ - - - - ./tests - - - - - - ./src - - + + + + ./src + + + + + ./tests + + diff --git a/tests/data/persistent_test_object.php b/tests/data/persistent_test_object.php index 8eb5889..55d3b7d 100644 --- a/tests/data/persistent_test_object.php +++ b/tests/data/persistent_test_object.php @@ -20,9 +20,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -32,6 +32,7 @@ * */ +#[\AllowDynamicProperties] class PersistentTestObject { public $id = null; @@ -46,7 +47,7 @@ class PersistentTestObject public static function insertCleanData() { $db = ezcDbInstance::get(); - $db->exec( "insert into " . $db->quoteIdentifier( "PO_test" ) . " (" + $db->exec( "insert into " . $db->quoteIdentifier( "PO_test" ) . " (" . $db->quoteIdentifier( "type_varchar" ) . ", " . $db->quoteIdentifier( "type_integer" ) . ", " . $db->quoteIdentifier( "type_decimal" ) . ", " . $db->quoteIdentifier( "type_text" ) . " ) VALUES ('Sweden', 9006405, 449.96, 'Sweden has nice girls!' )" ); diff --git a/tests/data/persistent_test_object_casesensitive.php b/tests/data/persistent_test_object_casesensitive.php index be34627..a75bb29 100644 --- a/tests/data/persistent_test_object_casesensitive.php +++ b/tests/data/persistent_test_object_casesensitive.php @@ -9,9 +9,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -24,6 +24,7 @@ * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 */ +#[\AllowDynamicProperties] class PersistentTestObjectCasesensitive { public $id = null; @@ -38,7 +39,7 @@ class PersistentTestObjectCasesensitive public static function insertCleanData() { $db = ezcDbInstance::get(); - $db->exec( "insert into " . $db->quoteIdentifier( "PO_test" ) . " (" + $db->exec( "insert into " . $db->quoteIdentifier( "PO_test" ) . " (" . $db->quoteIdentifier( "Type_VarCHAR" ) . ", " . $db->quoteIdentifier( "tYPe_inTEGer" ) . ", " . $db->quoteIdentifier( "type_decimal" ) . ", " . $db->quoteIdentifier( "TYPE_TEXT" ) . " ) VALUES ('Sweden', 9006405, 449.96, 'Sweden has nice girls!' )" ); diff --git a/tests/data/relation_test_birthday.php b/tests/data/relation_test_birthday.php index 9c62ddc..22c3a24 100644 --- a/tests/data/relation_test_birthday.php +++ b/tests/data/relation_test_birthday.php @@ -9,9 +9,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -30,7 +30,7 @@ class RelationTestBirthday extends RelationTest { public $person = null; public $birthday = null; - + public $id = null; public function setState( array $state ) { diff --git a/tests/database_type_test.php b/tests/database_type_test.php index 5b0f305..c6fc65a 100644 --- a/tests/database_type_test.php +++ b/tests/database_type_test.php @@ -35,8 +35,8 @@ */ class ezcPersistentDatabaseTypeTest extends ezcTestCase { - private $session; + private $db; public static function suite() { diff --git a/tests/instance_delayed_init_test.php b/tests/instance_delayed_init_test.php index 54533cc..4805c1f 100644 --- a/tests/instance_delayed_init_test.php +++ b/tests/instance_delayed_init_test.php @@ -36,6 +36,7 @@ class ezcPersistentObjectInstanceDelayedInitTest extends ezcTestCase { private $default; + private $db; public function setUp(): void { diff --git a/tests/persistent_session/instance_test.php b/tests/persistent_session/instance_test.php index 55f85b3..45633fe 100644 --- a/tests/persistent_session/instance_test.php +++ b/tests/persistent_session/instance_test.php @@ -64,7 +64,7 @@ public function testGetWithIdentifierValid() $manager = new ezcPersistentCodeManager( dirname( __FILE__ ) . "/PersistentObject/tests/data/" ); $session1 = new ezcPersistentSession( ezcDbInstance::get(), $manager ); $manager2 = clone( $manager ); - $manager2->a = "something"; + @$manager2->a = "something"; $session2 = new ezcPersistentSession( ezcDbInstance::get(), $manager2 ); ezcPersistentSessionInstance::set( $session1 ); diff --git a/tests/persistent_session_identity_decorator/relation_object_extractor_test.php b/tests/persistent_session_identity_decorator/relation_object_extractor_test.php index e2229a3..c10cc21 100644 --- a/tests/persistent_session_identity_decorator/relation_object_extractor_test.php +++ b/tests/persistent_session_identity_decorator/relation_object_extractor_test.php @@ -35,12 +35,9 @@ */ class ezcPersistentSessionIdentityDecoratorRelationObjectExtractorTest extends ezcPersistentSessionIdentityDecoratorRelationPrefetchTest { - protected $sesstion; - + protected $session; protected $idMap; - protected $extractor; - protected $options; public static function suite() diff --git a/tests/persistent_session_identity_decorator/relation_test.php b/tests/persistent_session_identity_decorator/relation_test.php index 598f34a..fbc84cf 100644 --- a/tests/persistent_session_identity_decorator/relation_test.php +++ b/tests/persistent_session_identity_decorator/relation_test.php @@ -38,10 +38,9 @@ class ezcPersistentSessionIdentityDecoratorRelationTest extends ezcTestCase { protected $session; - protected $idSession; - protected $idMap; + protected $db; public static function suite() { diff --git a/tests/relations/many_to_many_relation_test.php b/tests/relations/many_to_many_relation_test.php index ca9d215..2657610 100644 --- a/tests/relations/many_to_many_relation_test.php +++ b/tests/relations/many_to_many_relation_test.php @@ -37,8 +37,8 @@ */ class ezcPersistentManyToManyRelationTest extends ezcTestCase { - private $session; + private $db; public static function suite() { diff --git a/tests/relations/many_to_one_relation_test.php b/tests/relations/many_to_one_relation_test.php index 929c3bf..219c972 100644 --- a/tests/relations/many_to_one_relation_test.php +++ b/tests/relations/many_to_one_relation_test.php @@ -36,8 +36,8 @@ */ class ezcPersistentManyToOneRelationTest extends ezcTestCase { - private $session; + private $db; public static function suite() { diff --git a/tests/relations/multi_relation_test.php b/tests/relations/multi_relation_test.php index fbc89d7..b7dcb17 100644 --- a/tests/relations/multi_relation_test.php +++ b/tests/relations/multi_relation_test.php @@ -35,8 +35,8 @@ */ class ezcPersistentMultiRelationTest extends ezcTestCase { - private $session; + private $db; public static function suite() { diff --git a/tests/relations/one_to_many_relation_test.php b/tests/relations/one_to_many_relation_test.php index 26e748e..a4178f6 100644 --- a/tests/relations/one_to_many_relation_test.php +++ b/tests/relations/one_to_many_relation_test.php @@ -38,8 +38,8 @@ */ class ezcPersistentOneToManyRelationTest extends ezcTestCase { - private $session; + private $db; public static function suite() { diff --git a/tests/relations/one_to_one_relation_test.php b/tests/relations/one_to_one_relation_test.php index b92a025..20220ed 100644 --- a/tests/relations/one_to_one_relation_test.php +++ b/tests/relations/one_to_one_relation_test.php @@ -37,8 +37,8 @@ */ class ezcPersistentOneToOneRelationTest extends ezcTestCase { - private $session; + private $db; public static function suite() {