Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-11-13 04:19:20 +0300
committerThomas Steur <thomas.steur@googlemail.com>2014-11-13 06:16:54 +0300
commit320b0f19ef4b1cbe4fffaba5488a4a2d518313fd (patch)
treea93fbb9d9f335624faf6224035e89df6851b6e33 /plugins/ExamplePlugin
parentbe899f7a6a562cc2d670e610c7bfbbf0f6f73148 (diff)
refs #6617 if process or output size is too large, declare it as finished
Declares a process as finished as soon as a PID file is > 500bytes (contains only PID) and output file is > 100MB (which should usually not be larger than 100KB or 1MB) to prevent files growing up to many GBs. I added unit and integration tests for the file size detection. It is now possible to mock the methods file_exists and filesize although very simple so far. Later we can allow to define callbacks or to define different return values for different files or we can use something like vfsStream
Diffstat (limited to 'plugins/ExamplePlugin')
-rw-r--r--plugins/ExamplePlugin/tests/Unit/SimpleTest.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/ExamplePlugin/tests/Unit/SimpleTest.php b/plugins/ExamplePlugin/tests/Unit/SimpleTest.php
index 4b5341096f..4e0958d239 100644
--- a/plugins/ExamplePlugin/tests/Unit/SimpleTest.php
+++ b/plugins/ExamplePlugin/tests/Unit/SimpleTest.php
@@ -8,12 +8,14 @@
namespace Piwik\Plugins\ExamplePlugin\tests\Unit;
+use Piwik\Tests\Framework\TestCase\UnitTestCase;
+
/**
* @group ExamplePlugin
* @group SimpleTest
* @group Plugins
*/
-class SimpleTest extends \PHPUnit_Framework_TestCase
+class SimpleTest extends UnitTestCase
{
/**