From d0155e9d66665a7195194a988e16ff16623e28f0 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Sun, 29 Nov 2015 17:03:52 +0100 Subject: first step at cleaning up integration tests --- tests/integration/fixtures/Fixture.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/integration/fixtures/Fixture.php (limited to 'tests/integration/fixtures/Fixture.php') diff --git a/tests/integration/fixtures/Fixture.php b/tests/integration/fixtures/Fixture.php new file mode 100644 index 000000000..52015ebc2 --- /dev/null +++ b/tests/integration/fixtures/Fixture.php @@ -0,0 +1,26 @@ + + * @copyright Bernhard Posselt 2015 + */ + + +namespace OCA\News\Tests\Integration\Fixtures; + + +trait Fixture { + + public function fillDefaults(array $defaults=[]) { + foreach ($defaults as $key => $value) { + $method = 'set' . ucfirst($key); + $this->$method($value); + } + $this->resetUpdatedFields(); + } + +} \ No newline at end of file -- cgit v1.2.3