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 00:35:10 +0300
committerThomas Steur <thomas.steur@googlemail.com>2014-11-13 00:35:10 +0300
commit9320b9ef5186a2fb4d20c8440a0cce02bbe59ed9 (patch)
tree6bf09a254814909e424bf3f65868053c177fdf17 /plugins/ExamplePlugin
parent9ddd7b484acdcddb077e6cf8c7a301231c6bee84 (diff)
improved unit and integration test examples
Diffstat (limited to 'plugins/ExamplePlugin')
-rw-r--r--plugins/ExamplePlugin/tests/Integration/SimpleTest.php17
-rw-r--r--plugins/ExamplePlugin/tests/Unit/SimpleTest.php3
2 files changed, 20 insertions, 0 deletions
diff --git a/plugins/ExamplePlugin/tests/Integration/SimpleTest.php b/plugins/ExamplePlugin/tests/Integration/SimpleTest.php
index 3d8ac904f8..5aa9d4c617 100644
--- a/plugins/ExamplePlugin/tests/Integration/SimpleTest.php
+++ b/plugins/ExamplePlugin/tests/Integration/SimpleTest.php
@@ -18,6 +18,23 @@ use Piwik\Tests\Framework\TestCase\IntegrationTestCase;
class SimpleTest extends IntegrationTestCase
{
+ public function setUp()
+ {
+ parent::setUp();
+
+ // set up your test here if needed
+ }
+
+ public function tearDown()
+ {
+ // clean up your test here if needed
+
+ parent::tearDown();
+ }
+
+ /**
+ * All your actual test methods should start with the name "test"
+ */
public function testSimpleAddition()
{
$this->assertEquals(2, 1+1);
diff --git a/plugins/ExamplePlugin/tests/Unit/SimpleTest.php b/plugins/ExamplePlugin/tests/Unit/SimpleTest.php
index 396ee20785..4b5341096f 100644
--- a/plugins/ExamplePlugin/tests/Unit/SimpleTest.php
+++ b/plugins/ExamplePlugin/tests/Unit/SimpleTest.php
@@ -16,6 +16,9 @@ namespace Piwik\Plugins\ExamplePlugin\tests\Unit;
class SimpleTest extends \PHPUnit_Framework_TestCase
{
+ /**
+ * All your actual test methods should start with the name "test"
+ */
public function testSimpleAddition()
{
$this->assertEquals(2, 1+1);