PHP Класс SoftDelete\Test\TestCase\Model\Table\SoftDeleteBehaviorTest

Наследование: extends Cake\TestSuite\TestCase
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$fixtures array fixtures

Открытые методы

Метод Описание
setUp ( ) : void setUp method
tearDown ( ) : void tearDown method
testCounterCache ( ) Tests that soft deleting affects counters the same way that hard deleting.
testDelete ( ) Tests that Table::delete() does not hard delete.
testDeleteAll ( ) Tests that Table::deleteAll() does not hard delete
testDeleteWithCustomField ( ) : void Ensure that when deleting a record which has a custom field defined in the table, that it is still soft deleted.
testDynamicFinder ( ) Tests that a soft deleted entities is not found when calling Table::findByXXX()
testFind ( ) Tests that a soft deleted entities is not found when calling Table::find()
testFindBelongsToMany ( ) Tests that soft deleted records in join table are taken into account when retrieving an entity with a belongsToManyAssociation.
testFindMatching ( ) Test that entities matching a soft deleted associated record are not returned when using $query->matching().
testFindWithOrWhere ( )
testFindingWithCustomField ( ) : void Using a table with a custom soft delete field, ensure we can still filter the found results properly.
testHardDelete ( )
testHardDeleteAll ( ) Tests hardDeleteAll.
testHardDeleteWithCustomField ( ) : void With a custom soft delete field ensure that a soft deleted record can still be permanently removed.
testHasManyAssociation ( ) Tests that soft deleting an entity also soft deletes its belonging entities.
testMissingColumn ( ) When a configured field is missing from the table, an exception should be thrown
testRestore ( ) : void Test soft deleting and restoring a record.

Описание методов

setUp() публичный Метод

setUp method
public setUp ( ) : void
Результат void

tearDown() публичный Метод

tearDown method
public tearDown ( ) : void
Результат void

testCounterCache() публичный Метод

Tests that soft deleting affects counters the same way that hard deleting.
public testCounterCache ( )

testDelete() публичный Метод

Tests that Table::delete() does not hard delete.
public testDelete ( )

testDeleteAll() публичный Метод

Tests that Table::deleteAll() does not hard delete
public testDeleteAll ( )

testDeleteWithCustomField() публичный Метод

Ensure that when deleting a record which has a custom field defined in the table, that it is still soft deleted.
public testDeleteWithCustomField ( ) : void
Результат void

testDynamicFinder() публичный Метод

Tests that a soft deleted entities is not found when calling Table::findByXXX()
public testDynamicFinder ( )

testFind() публичный Метод

Tests that a soft deleted entities is not found when calling Table::find()
public testFind ( )

testFindBelongsToMany() публичный Метод

Tests that soft deleted records in join table are taken into account when retrieving an entity with a belongsToManyAssociation.

testFindMatching() публичный Метод

Test that entities matching a soft deleted associated record are not returned when using $query->matching().
public testFindMatching ( )

testFindWithOrWhere() публичный Метод

public testFindWithOrWhere ( )

testFindingWithCustomField() публичный Метод

Using a table with a custom soft delete field, ensure we can still filter the found results properly.
public testFindingWithCustomField ( ) : void
Результат void

testHardDelete() публичный Метод

public testHardDelete ( )

testHardDeleteAll() публичный Метод

Tests hardDeleteAll.
public testHardDeleteAll ( )

testHardDeleteWithCustomField() публичный Метод

With a custom soft delete field ensure that a soft deleted record can still be permanently removed.
public testHardDeleteWithCustomField ( ) : void
Результат void

testHasManyAssociation() публичный Метод

Tests that soft deleting an entity also soft deletes its belonging entities.

testMissingColumn() публичный Метод

When a configured field is missing from the table, an exception should be thrown
public testMissingColumn ( )

testRestore() публичный Метод

Test soft deleting and restoring a record.
public testRestore ( ) : void
Результат void

Описание свойств

$fixtures публичное свойство

fixtures
public array $fixtures
Результат array