Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .github/workflows/coding-standard.yml

This file was deleted.

23 changes: 11 additions & 12 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="./tests/bootstrap.php" colors="true" beStrictAboutTestsThatDoNotTestAnything="false">
<testsuites>
<testsuite name="Zeta Components PersistentObject">
<directory suffix="_test.php">./tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>./src</directory>
</whitelist>
</filter>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="./tests/bootstrap.php" colors="true" beStrictAboutTestsThatDoNotTestAnything="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<include>
<directory>./src</directory>
</include>
</coverage>
<testsuites>
<testsuite name="Zeta Components PersistentObject">
<directory suffix="_test.php">./tests</directory>
</testsuite>
</testsuites>
</phpunit>
7 changes: 4 additions & 3 deletions tests/data/persistent_test_object.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -32,6 +32,7 @@
*
*/

#[\AllowDynamicProperties]
class PersistentTestObject
{
public $id = null;
Expand All @@ -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!' )" );
Expand Down
7 changes: 4 additions & 3 deletions tests/data/persistent_test_object_casesensitive.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,6 +24,7 @@
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
*/

#[\AllowDynamicProperties]
class PersistentTestObjectCasesensitive
{
public $id = null;
Expand All @@ -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!' )" );
Expand Down
6 changes: 3 additions & 3 deletions tests/data/relation_test_birthday.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -30,7 +30,7 @@ class RelationTestBirthday extends RelationTest
{
public $person = null;
public $birthday = null;

public $id = null;

public function setState( array $state )
{
Expand Down
2 changes: 1 addition & 1 deletion tests/database_type_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
*/
class ezcPersistentDatabaseTypeTest extends ezcTestCase
{

private $session;
private $db;

public static function suite()
{
Expand Down
1 change: 1 addition & 0 deletions tests/instance_delayed_init_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
class ezcPersistentObjectInstanceDelayedInitTest extends ezcTestCase
{
private $default;
private $db;

public function setUp(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/persistent_session/instance_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,9 @@
*/
class ezcPersistentSessionIdentityDecoratorRelationObjectExtractorTest extends ezcPersistentSessionIdentityDecoratorRelationPrefetchTest
{
protected $sesstion;

protected $session;
protected $idMap;

protected $extractor;

protected $options;

public static function suite()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@
class ezcPersistentSessionIdentityDecoratorRelationTest extends ezcTestCase
{
protected $session;

protected $idSession;

protected $idMap;
protected $db;

public static function suite()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/relations/many_to_many_relation_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
*/
class ezcPersistentManyToManyRelationTest extends ezcTestCase
{

private $session;
private $db;

public static function suite()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/relations/many_to_one_relation_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
*/
class ezcPersistentManyToOneRelationTest extends ezcTestCase
{

private $session;
private $db;

public static function suite()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/relations/multi_relation_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
*/
class ezcPersistentMultiRelationTest extends ezcTestCase
{

private $session;
private $db;

public static function suite()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/relations/one_to_many_relation_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
*/
class ezcPersistentOneToManyRelationTest extends ezcTestCase
{

private $session;
private $db;

public static function suite()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/relations/one_to_one_relation_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
*/
class ezcPersistentOneToOneRelationTest extends ezcTestCase
{

private $session;
private $db;

public static function suite()
{
Expand Down
Loading