diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-11-13 00:35:10 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-11-13 00:35:10 +0300 |
commit | 9320b9ef5186a2fb4d20c8440a0cce02bbe59ed9 (patch) | |
tree | 6bf09a254814909e424bf3f65868053c177fdf17 /plugins/ExamplePlugin | |
parent | 9ddd7b484acdcddb077e6cf8c7a301231c6bee84 (diff) |
improved unit and integration test examples
Diffstat (limited to 'plugins/ExamplePlugin')
-rw-r--r-- | plugins/ExamplePlugin/tests/Integration/SimpleTest.php | 17 | ||||
-rw-r--r-- | plugins/ExamplePlugin/tests/Unit/SimpleTest.php | 3 |
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); |