catalyst / moodle-tool_dataflows

A generic workflow and processing engine which can be configured to do a large variety of tasks.
GNU General Public License v3.0
10 stars 6 forks source link

Unset class vars in test teardown #866

Closed Peterburnett closed 4 months ago

Peterburnett commented 4 months ago

Before:

There were 3 failures:

1) tool_dataflows\tool_dataflows_connector_compression_test::test_gzip_compression_decompression
Property 'basedir' defined in 'tool_dataflows\tool_dataflows_connector_compression_test' was not reset after the test!
Please either find a way to avoid using a class variable or make sure it get's unset in the tearDown method to avoid creating memory leaks.

/var/www/site/server/lib/phpunit/classes/testcase.php:623
/var/www/sit/server/lib/phpunit/classes/testcase.php:148

2) tool_dataflows\tool_dataflows_connector_compression_test::test_gzip_validation
Property 'basedir' defined in 'tool_dataflows\tool_dataflows_connector_compression_test' was not reset after the test!
Please either find a way to avoid using a class variable or make sure it get's unset in the tearDown method to avoid creating memory leaks.

/var/www/site/server/lib/phpunit/classes/testcase.php:623
/var/www/site/server/lib/phpunit/classes/testcase.php:148

3) tool_dataflows\tool_dataflows_flow_compression_test::test_gzip_compression_decompression
Property 'readdir' defined in 'tool_dataflows\tool_dataflows_flow_compression_test' was not reset after the test!
Please either find a way to avoid using a class variable or make sure it get's unset in the tearDown method to avoid creating memory leaks.

/var/www/site/server/lib/phpunit/classes/testcase.php:623
/var/www/site/server/lib/phpunit/classes/testcase.php:148

After:

OK, but incomplete, skipped, or risky tests!
Tests: 328, Assertions: 744, Skipped: 1.