diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2016-07-23 18:34:17 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2016-07-23 18:34:17 +0200 |
commit | 9b1fe46fe995bc103d3c5cfa9a552d050ff0ead8 (patch) | |
tree | 7b86abb65272df89f61e849a08edef5326207b8a /tests/unit/db | |
parent | b88d42074dcd0842d0db3ca8ed24b0b9ccb78a7a (diff) |
Add timestamps for all entities in milisecond unix time format
Diffstat (limited to 'tests/unit/db')
-rw-r--r-- | tests/unit/db/FeedMapperTest.php | 4 | ||||
-rw-r--r-- | tests/unit/db/FolderMapperTest.php | 4 | ||||
-rw-r--r-- | tests/unit/db/ItemMapperTest.php | 4 | ||||
-rw-r--r-- | tests/unit/db/MapperFactoryTest.php | 7 | ||||
-rw-r--r-- | tests/unit/db/mysql/ItemMapperTest.php | 4 |
5 files changed, 15 insertions, 8 deletions
diff --git a/tests/unit/db/FeedMapperTest.php b/tests/unit/db/FeedMapperTest.php index 97488fb88..7e2f8d777 100644 --- a/tests/unit/db/FeedMapperTest.php +++ b/tests/unit/db/FeedMapperTest.php @@ -14,6 +14,8 @@ namespace OCA\News\Db; +use OCA\News\Utility\Time; + class FeedMapperTest extends \OCA\News\Tests\Unit\Db\MapperTestUtility { private $mapper; @@ -22,7 +24,7 @@ class FeedMapperTest extends \OCA\News\Tests\Unit\Db\MapperTestUtility { protected function setUp(){ parent::setUp(); - $this->mapper = new FeedMapper($this->db); + $this->mapper = new FeedMapper($this->db, new Time()); // create mock feeds $feed1 = new Feed(); diff --git a/tests/unit/db/FolderMapperTest.php b/tests/unit/db/FolderMapperTest.php index 00ad2127d..fcb82e7e1 100644 --- a/tests/unit/db/FolderMapperTest.php +++ b/tests/unit/db/FolderMapperTest.php @@ -14,6 +14,8 @@ namespace OCA\News\Db; +use OCA\News\Utility\Time; + class FolderMapperTest extends \OCA\News\Tests\Unit\Db\MapperTestUtility { private $folderMapper; @@ -23,7 +25,7 @@ class FolderMapperTest extends \OCA\News\Tests\Unit\Db\MapperTestUtility { protected function setUp(){ parent::setUp(); - $this->folderMapper = new FolderMapper($this->db); + $this->folderMapper = new FolderMapper($this->db, new Time()); // create mock folders $folder1 = new Folder(); diff --git a/tests/unit/db/ItemMapperTest.php b/tests/unit/db/ItemMapperTest.php index 8b42aebb8..7b11b7862 100644 --- a/tests/unit/db/ItemMapperTest.php +++ b/tests/unit/db/ItemMapperTest.php @@ -14,6 +14,8 @@ namespace OCA\News\Db; +use OCA\News\Utility\Time; + class ItemMapperTest extends \OCA\News\Tests\Unit\Db\MapperTestUtility { private $mapper; @@ -29,7 +31,7 @@ class ItemMapperTest extends \OCA\News\Tests\Unit\Db\MapperTestUtility { public function setUp() { parent::setup(); - $this->mapper = new ItemMapper($this->db); + $this->mapper = new ItemMapper($this->db, new Time()); // create mock items $item1 = new Item(); diff --git a/tests/unit/db/MapperFactoryTest.php b/tests/unit/db/MapperFactoryTest.php index 341dea0e9..1544ddf2c 100644 --- a/tests/unit/db/MapperFactoryTest.php +++ b/tests/unit/db/MapperFactoryTest.php @@ -13,6 +13,7 @@ namespace OCA\News\Db; +use OCA\News\Utility\Time; use PHPUnit_Framework_TestCase; use OCP\IDb; @@ -32,17 +33,17 @@ class MapperFactoryTest extends PHPUnit_Framework_TestCase { } public function testGetItemMapperSqlite() { - $factory = new MapperFactory($this->db, 'sqlite'); + $factory = new MapperFactory($this->db, 'sqlite', new Time()); $this->assertTrue($factory->build() instanceof ItemMapper); } public function testGetItemMapperPostgres() { - $factory = new MapperFactory($this->db, 'pgsql'); + $factory = new MapperFactory($this->db, 'pgsql', new Time()); $this->assertTrue($factory->build() instanceof ItemMapper); } public function testGetItemMapperMysql() { - $factory = new MapperFactory($this->db, 'mysql'); + $factory = new MapperFactory($this->db, 'mysql', new Time()); $this->assertTrue($factory->build() instanceof MysqlMapper); } diff --git a/tests/unit/db/mysql/ItemMapperTest.php b/tests/unit/db/mysql/ItemMapperTest.php index 3c091341a..57f3cd77f 100644 --- a/tests/unit/db/mysql/ItemMapperTest.php +++ b/tests/unit/db/mysql/ItemMapperTest.php @@ -15,7 +15,7 @@ namespace OCA\News\Db\Mysql; use \OCA\News\Db\Item; use \OCA\News\Db\StatusFlag; - +use OCA\News\Utility\Time; class ItemMapperTest extends \OCA\News\Tests\Unit\Db\MapperTestUtility { @@ -32,7 +32,7 @@ class ItemMapperTest extends \OCA\News\Tests\Unit\Db\MapperTestUtility { public function setUp() { parent::setUp(); - $this->mapper = new ItemMapper($this->db); + $this->mapper = new ItemMapper($this->db, new Time()); // create mock items $item1 = new Item(); |