@@ -29,83 +29,83 @@ |
||
| 29 | 29 | |
| 30 | 30 | class PageControllerTest extends PHPUnit_Framework_TestCase { |
| 31 | 31 | |
| 32 | - private $controller; |
|
| 33 | - private $userId = 'john'; |
|
| 32 | + private $controller; |
|
| 33 | + private $userId = 'john'; |
|
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * {@inheritDoc} |
|
| 37 | - */ |
|
| 38 | - public function setUp() { |
|
| 39 | - $request = $this->getMockBuilder('OCP\IRequest') |
|
| 40 | - ->disableOriginalConstructor() |
|
| 41 | - ->getMock(); |
|
| 42 | - $userManager = $this->getMockBuilder('OCP\IUserManager') |
|
| 43 | - ->disableOriginalConstructor() |
|
| 44 | - ->getMock(); |
|
| 45 | - $groupManager = $this->getMockBuilder('OCP\IGroupManager') |
|
| 46 | - ->disableOriginalConstructor() |
|
| 47 | - ->getMock(); |
|
| 48 | - $avatarManager = $this->getMockBuilder('OCP\IAvatarManager') |
|
| 49 | - ->disableOriginalConstructor() |
|
| 50 | - ->getMock(); |
|
| 51 | - $logger = $this->getMockBuilder('OCP\ILogger') |
|
| 52 | - ->disableOriginalConstructor() |
|
| 53 | - ->getMock(); |
|
| 54 | - $l10n = $this->getMockBuilder('OCP\IL10N') |
|
| 55 | - ->disableOriginalConstructor() |
|
| 56 | - ->getMock(); |
|
| 57 | - $urlGenerator = $this->getMockBuilder('OCP\IURLGenerator') |
|
| 58 | - ->disableOriginalConstructor() |
|
| 59 | - ->getMock(); |
|
| 60 | - $commentMapper = $this->getMockBuilder('OCA\Polls\Db\CommentMapper') |
|
| 61 | - ->disableOriginalConstructor() |
|
| 62 | - ->getMock(); |
|
| 63 | - $dateMapper = $this->getMockBuilder('OCA\Polls\Db\DateMapper') |
|
| 64 | - ->disableOriginalConstructor() |
|
| 65 | - ->getMock(); |
|
| 66 | - $eventMapper = $this->getMockBuilder('OCA\Polls\Db\EventMapper') |
|
| 67 | - ->disableOriginalConstructor() |
|
| 68 | - ->getMock(); |
|
| 69 | - $notificationMapper = $this->getMockBuilder('OCA\Polls\Db\NotificationMapper') |
|
| 70 | - ->disableOriginalConstructor() |
|
| 71 | - ->getMock(); |
|
| 72 | - $participationMapper = $this->getMockBuilder('OCA\Polls\Db\ParticipationMapper') |
|
| 73 | - ->disableOriginalConstructor() |
|
| 74 | - ->getMock(); |
|
| 75 | - $participationTextMapper = $this->getMockBuilder('OCA\Polls\Db\ParticipationTextMapper') |
|
| 76 | - ->disableOriginalConstructor() |
|
| 77 | - ->getMock(); |
|
| 78 | - $textMapper = $this->getMockBuilder('OCA\Polls\Db\TextMapper') |
|
| 79 | - ->disableOriginalConstructor() |
|
| 80 | - ->getMock(); |
|
| 35 | + /** |
|
| 36 | + * {@inheritDoc} |
|
| 37 | + */ |
|
| 38 | + public function setUp() { |
|
| 39 | + $request = $this->getMockBuilder('OCP\IRequest') |
|
| 40 | + ->disableOriginalConstructor() |
|
| 41 | + ->getMock(); |
|
| 42 | + $userManager = $this->getMockBuilder('OCP\IUserManager') |
|
| 43 | + ->disableOriginalConstructor() |
|
| 44 | + ->getMock(); |
|
| 45 | + $groupManager = $this->getMockBuilder('OCP\IGroupManager') |
|
| 46 | + ->disableOriginalConstructor() |
|
| 47 | + ->getMock(); |
|
| 48 | + $avatarManager = $this->getMockBuilder('OCP\IAvatarManager') |
|
| 49 | + ->disableOriginalConstructor() |
|
| 50 | + ->getMock(); |
|
| 51 | + $logger = $this->getMockBuilder('OCP\ILogger') |
|
| 52 | + ->disableOriginalConstructor() |
|
| 53 | + ->getMock(); |
|
| 54 | + $l10n = $this->getMockBuilder('OCP\IL10N') |
|
| 55 | + ->disableOriginalConstructor() |
|
| 56 | + ->getMock(); |
|
| 57 | + $urlGenerator = $this->getMockBuilder('OCP\IURLGenerator') |
|
| 58 | + ->disableOriginalConstructor() |
|
| 59 | + ->getMock(); |
|
| 60 | + $commentMapper = $this->getMockBuilder('OCA\Polls\Db\CommentMapper') |
|
| 61 | + ->disableOriginalConstructor() |
|
| 62 | + ->getMock(); |
|
| 63 | + $dateMapper = $this->getMockBuilder('OCA\Polls\Db\DateMapper') |
|
| 64 | + ->disableOriginalConstructor() |
|
| 65 | + ->getMock(); |
|
| 66 | + $eventMapper = $this->getMockBuilder('OCA\Polls\Db\EventMapper') |
|
| 67 | + ->disableOriginalConstructor() |
|
| 68 | + ->getMock(); |
|
| 69 | + $notificationMapper = $this->getMockBuilder('OCA\Polls\Db\NotificationMapper') |
|
| 70 | + ->disableOriginalConstructor() |
|
| 71 | + ->getMock(); |
|
| 72 | + $participationMapper = $this->getMockBuilder('OCA\Polls\Db\ParticipationMapper') |
|
| 73 | + ->disableOriginalConstructor() |
|
| 74 | + ->getMock(); |
|
| 75 | + $participationTextMapper = $this->getMockBuilder('OCA\Polls\Db\ParticipationTextMapper') |
|
| 76 | + ->disableOriginalConstructor() |
|
| 77 | + ->getMock(); |
|
| 78 | + $textMapper = $this->getMockBuilder('OCA\Polls\Db\TextMapper') |
|
| 79 | + ->disableOriginalConstructor() |
|
| 80 | + ->getMock(); |
|
| 81 | 81 | |
| 82 | - $this->controller = new PageController( |
|
| 83 | - 'polls', |
|
| 84 | - $request, |
|
| 85 | - $userManager, |
|
| 86 | - $groupManager, |
|
| 87 | - $avatarManager, |
|
| 88 | - $logger, |
|
| 89 | - $l10n, |
|
| 90 | - $urlGenerator, |
|
| 91 | - $this->userId, |
|
| 92 | - $commentMapper, |
|
| 93 | - $dateMapper, |
|
| 94 | - $eventMapper, |
|
| 95 | - $notificationMapper, |
|
| 96 | - $participationMapper, |
|
| 97 | - $participationTextMapper, |
|
| 98 | - $textMapper |
|
| 99 | - ); |
|
| 100 | - } |
|
| 82 | + $this->controller = new PageController( |
|
| 83 | + 'polls', |
|
| 84 | + $request, |
|
| 85 | + $userManager, |
|
| 86 | + $groupManager, |
|
| 87 | + $avatarManager, |
|
| 88 | + $logger, |
|
| 89 | + $l10n, |
|
| 90 | + $urlGenerator, |
|
| 91 | + $this->userId, |
|
| 92 | + $commentMapper, |
|
| 93 | + $dateMapper, |
|
| 94 | + $eventMapper, |
|
| 95 | + $notificationMapper, |
|
| 96 | + $participationMapper, |
|
| 97 | + $participationTextMapper, |
|
| 98 | + $textMapper |
|
| 99 | + ); |
|
| 100 | + } |
|
| 101 | 101 | |
| 102 | - /** |
|
| 103 | - * |
|
| 104 | - */ |
|
| 105 | - public function testIndex() { |
|
| 106 | - $result = $this->controller->index(); |
|
| 102 | + /** |
|
| 103 | + * |
|
| 104 | + */ |
|
| 105 | + public function testIndex() { |
|
| 106 | + $result = $this->controller->index(); |
|
| 107 | 107 | |
| 108 | - $this->assertEquals('main.tmpl', $result->getTemplateName()); |
|
| 109 | - $this->assertTrue($result instanceof TemplateResponse); |
|
| 110 | - } |
|
| 108 | + $this->assertEquals('main.tmpl', $result->getTemplateName()); |
|
| 109 | + $this->assertTrue($result instanceof TemplateResponse); |
|
| 110 | + } |
|
| 111 | 111 | } |
@@ -27,20 +27,20 @@ |
||
| 27 | 27 | * General factory for the event model. |
| 28 | 28 | */ |
| 29 | 29 | $fm->define('OCA\Polls\Db\Event')->setDefinitions([ |
| 30 | - 'type' => 0, |
|
| 31 | - 'title' => Faker::sentence(10), |
|
| 32 | - 'description' => Faker::paragraph(), |
|
| 33 | - 'owner' => Faker::firstNameMale(), |
|
| 34 | - 'created' => function () { |
|
| 35 | - $date = new DateTime( 'today'); |
|
| 36 | - return $date->format('Y-m-d H:i:s'); |
|
| 37 | - }, |
|
| 38 | - 'access' => 'registered', |
|
| 39 | - 'expire' => function () { |
|
| 40 | - $date = new DateTime( 'tomorrow'); |
|
| 41 | - return $date->format('Y-m-d H:i:s'); |
|
| 42 | - }, |
|
| 43 | - 'hash' => Faker::regexify('[A-Za-z0-9]{16}'), |
|
| 44 | - 'isAnonymous' => 0, |
|
| 45 | - 'fullAnonymous' => 0 |
|
| 30 | + 'type' => 0, |
|
| 31 | + 'title' => Faker::sentence(10), |
|
| 32 | + 'description' => Faker::paragraph(), |
|
| 33 | + 'owner' => Faker::firstNameMale(), |
|
| 34 | + 'created' => function () { |
|
| 35 | + $date = new DateTime( 'today'); |
|
| 36 | + return $date->format('Y-m-d H:i:s'); |
|
| 37 | + }, |
|
| 38 | + 'access' => 'registered', |
|
| 39 | + 'expire' => function () { |
|
| 40 | + $date = new DateTime( 'tomorrow'); |
|
| 41 | + return $date->format('Y-m-d H:i:s'); |
|
| 42 | + }, |
|
| 43 | + 'hash' => Faker::regexify('[A-Za-z0-9]{16}'), |
|
| 44 | + 'isAnonymous' => 0, |
|
| 45 | + 'fullAnonymous' => 0 |
|
| 46 | 46 | ]); |
@@ -31,13 +31,13 @@ |
||
| 31 | 31 | 'title' => Faker::sentence(10), |
| 32 | 32 | 'description' => Faker::paragraph(), |
| 33 | 33 | 'owner' => Faker::firstNameMale(), |
| 34 | - 'created' => function () { |
|
| 35 | - $date = new DateTime( 'today'); |
|
| 34 | + 'created' => function() { |
|
| 35 | + $date = new DateTime('today'); |
|
| 36 | 36 | return $date->format('Y-m-d H:i:s'); |
| 37 | 37 | }, |
| 38 | 38 | 'access' => 'registered', |
| 39 | - 'expire' => function () { |
|
| 40 | - $date = new DateTime( 'tomorrow'); |
|
| 39 | + 'expire' => function() { |
|
| 40 | + $date = new DateTime('tomorrow'); |
|
| 41 | 41 | return $date->format('Y-m-d H:i:s'); |
| 42 | 42 | }, |
| 43 | 43 | 'hash' => Faker::regexify('[A-Za-z0-9]{16}'), |
@@ -27,10 +27,10 @@ |
||
| 27 | 27 | * General factory for the comment model. |
| 28 | 28 | */ |
| 29 | 29 | $fm->define('OCA\Polls\Db\Comment')->setDefinitions([ |
| 30 | - 'userId' => Faker::firstNameMale(), |
|
| 31 | - 'dt' => function () { |
|
| 32 | - $date = new DateTime( 'today'); |
|
| 33 | - return $date->format('Y-m-d H:i:s'); |
|
| 34 | - }, |
|
| 35 | - 'comment' => Faker::paragraph() |
|
| 30 | + 'userId' => Faker::firstNameMale(), |
|
| 31 | + 'dt' => function () { |
|
| 32 | + $date = new DateTime( 'today'); |
|
| 33 | + return $date->format('Y-m-d H:i:s'); |
|
| 34 | + }, |
|
| 35 | + 'comment' => Faker::paragraph() |
|
| 36 | 36 | ]); |
@@ -28,8 +28,8 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | $fm->define('OCA\Polls\Db\Comment')->setDefinitions([ |
| 30 | 30 | 'userId' => Faker::firstNameMale(), |
| 31 | - 'dt' => function () { |
|
| 32 | - $date = new DateTime( 'today'); |
|
| 31 | + 'dt' => function() { |
|
| 32 | + $date = new DateTime('today'); |
|
| 33 | 33 | return $date->format('Y-m-d H:i:s'); |
| 34 | 34 | }, |
| 35 | 35 | 'comment' => Faker::paragraph() |
@@ -35,71 +35,71 @@ |
||
| 35 | 35 | |
| 36 | 36 | class CommentMapperTest extends PHPUnit_Framework_TestCase { |
| 37 | 37 | |
| 38 | - /** @var IDBConnection */ |
|
| 39 | - private $con; |
|
| 40 | - /** @var CommentMapper */ |
|
| 41 | - private $commentMapper; |
|
| 42 | - /** @var EventMapper */ |
|
| 43 | - private $eventMapper; |
|
| 44 | - /** @var FactoryMuffin */ |
|
| 45 | - private $fm; |
|
| 38 | + /** @var IDBConnection */ |
|
| 39 | + private $con; |
|
| 40 | + /** @var CommentMapper */ |
|
| 41 | + private $commentMapper; |
|
| 42 | + /** @var EventMapper */ |
|
| 43 | + private $eventMapper; |
|
| 44 | + /** @var FactoryMuffin */ |
|
| 45 | + private $fm; |
|
| 46 | 46 | |
| 47 | - /** |
|
| 48 | - * {@inheritDoc} |
|
| 49 | - */ |
|
| 50 | - public function setUp() { |
|
| 51 | - parent::setUp(); |
|
| 47 | + /** |
|
| 48 | + * {@inheritDoc} |
|
| 49 | + */ |
|
| 50 | + public function setUp() { |
|
| 51 | + parent::setUp(); |
|
| 52 | 52 | |
| 53 | - $this->con = \OC::$server->getDatabaseConnection(); |
|
| 54 | - $this->commentMapper = new CommentMapper($this->con); |
|
| 55 | - $this->eventMapper = new EventMapper($this->con); |
|
| 53 | + $this->con = \OC::$server->getDatabaseConnection(); |
|
| 54 | + $this->commentMapper = new CommentMapper($this->con); |
|
| 55 | + $this->eventMapper = new EventMapper($this->con); |
|
| 56 | 56 | |
| 57 | - $this->fm = new FactoryMuffin(); |
|
| 58 | - $this->fm->loadFactories(__DIR__ . '/../Factories'); |
|
| 59 | - } |
|
| 57 | + $this->fm = new FactoryMuffin(); |
|
| 58 | + $this->fm->loadFactories(__DIR__ . '/../Factories'); |
|
| 59 | + } |
|
| 60 | 60 | |
| 61 | - /** |
|
| 62 | - * Test the creation of an event and a comment object and save them to the database. |
|
| 63 | - * |
|
| 64 | - * @return Comment |
|
| 65 | - */ |
|
| 66 | - public function testCreate() { |
|
| 67 | - /** @var Event $event */ |
|
| 68 | - $event = $this->fm->instance('OCA\Polls\Db\Event'); |
|
| 69 | - $this->assertInstanceOf(Event::class, $this->eventMapper->insert($event)); |
|
| 61 | + /** |
|
| 62 | + * Test the creation of an event and a comment object and save them to the database. |
|
| 63 | + * |
|
| 64 | + * @return Comment |
|
| 65 | + */ |
|
| 66 | + public function testCreate() { |
|
| 67 | + /** @var Event $event */ |
|
| 68 | + $event = $this->fm->instance('OCA\Polls\Db\Event'); |
|
| 69 | + $this->assertInstanceOf(Event::class, $this->eventMapper->insert($event)); |
|
| 70 | 70 | |
| 71 | - /** @var Comment $comment */ |
|
| 72 | - $comment = $this->fm->instance('OCA\Polls\Db\Comment'); |
|
| 73 | - $comment->setPollId($event->getId()); |
|
| 74 | - $this->assertInstanceOf(Comment::class, $this->commentMapper->insert($comment)); |
|
| 71 | + /** @var Comment $comment */ |
|
| 72 | + $comment = $this->fm->instance('OCA\Polls\Db\Comment'); |
|
| 73 | + $comment->setPollId($event->getId()); |
|
| 74 | + $this->assertInstanceOf(Comment::class, $this->commentMapper->insert($comment)); |
|
| 75 | 75 | |
| 76 | - return $comment; |
|
| 77 | - } |
|
| 76 | + return $comment; |
|
| 77 | + } |
|
| 78 | 78 | |
| 79 | - /** |
|
| 80 | - * Update the previously created comment. |
|
| 81 | - * |
|
| 82 | - * @depends testCreate |
|
| 83 | - * @param Comment $comment |
|
| 84 | - * @return Comment |
|
| 85 | - */ |
|
| 86 | - public function testUpdate(Comment $comment) { |
|
| 87 | - $newComment = Faker::paragraph(); |
|
| 88 | - $comment->setComment($newComment()); |
|
| 89 | - $this->commentMapper->update($comment); |
|
| 79 | + /** |
|
| 80 | + * Update the previously created comment. |
|
| 81 | + * |
|
| 82 | + * @depends testCreate |
|
| 83 | + * @param Comment $comment |
|
| 84 | + * @return Comment |
|
| 85 | + */ |
|
| 86 | + public function testUpdate(Comment $comment) { |
|
| 87 | + $newComment = Faker::paragraph(); |
|
| 88 | + $comment->setComment($newComment()); |
|
| 89 | + $this->commentMapper->update($comment); |
|
| 90 | 90 | |
| 91 | - return $comment; |
|
| 92 | - } |
|
| 91 | + return $comment; |
|
| 92 | + } |
|
| 93 | 93 | |
| 94 | - /** |
|
| 95 | - * Delete the previously created entries from the database. |
|
| 96 | - * |
|
| 97 | - * @depends testUpdate |
|
| 98 | - * @param Comment $comment |
|
| 99 | - */ |
|
| 100 | - public function testDelete(Comment $comment) { |
|
| 101 | - $event = $this->eventMapper->find($comment->getPollId()); |
|
| 102 | - $this->commentMapper->delete($comment); |
|
| 103 | - $this->eventMapper->delete($event); |
|
| 104 | - } |
|
| 94 | + /** |
|
| 95 | + * Delete the previously created entries from the database. |
|
| 96 | + * |
|
| 97 | + * @depends testUpdate |
|
| 98 | + * @param Comment $comment |
|
| 99 | + */ |
|
| 100 | + public function testDelete(Comment $comment) { |
|
| 101 | + $event = $this->eventMapper->find($comment->getPollId()); |
|
| 102 | + $this->commentMapper->delete($comment); |
|
| 103 | + $this->eventMapper->delete($event); |
|
| 104 | + } |
|
| 105 | 105 | } |
@@ -29,17 +29,17 @@ |
||
| 29 | 29 | |
| 30 | 30 | class ParticipationMapperTest extends PHPUnit_Framework_TestCase { |
| 31 | 31 | |
| 32 | - /** @var IDBConnection */ |
|
| 33 | - private $con; |
|
| 34 | - /** @var ParticipationMapper */ |
|
| 35 | - private $participationMapper; |
|
| 32 | + /** @var IDBConnection */ |
|
| 33 | + private $con; |
|
| 34 | + /** @var ParticipationMapper */ |
|
| 35 | + private $participationMapper; |
|
| 36 | 36 | |
| 37 | - /** |
|
| 38 | - * {@inheritDoc} |
|
| 39 | - */ |
|
| 40 | - public function setUp() { |
|
| 41 | - parent::setUp(); |
|
| 42 | - $this->con = \OC::$server->getDatabaseConnection(); |
|
| 43 | - $this->participationMapper = new ParticipationMapper($this->con); |
|
| 44 | - } |
|
| 37 | + /** |
|
| 38 | + * {@inheritDoc} |
|
| 39 | + */ |
|
| 40 | + public function setUp() { |
|
| 41 | + parent::setUp(); |
|
| 42 | + $this->con = \OC::$server->getDatabaseConnection(); |
|
| 43 | + $this->participationMapper = new ParticipationMapper($this->con); |
|
| 44 | + } |
|
| 45 | 45 | } |
@@ -29,17 +29,17 @@ |
||
| 29 | 29 | |
| 30 | 30 | class EventMapperTest extends PHPUnit_Framework_TestCase { |
| 31 | 31 | |
| 32 | - /** @var IDBConnection */ |
|
| 33 | - private $con; |
|
| 34 | - /** @var EventMapper */ |
|
| 35 | - private $eventMapper; |
|
| 32 | + /** @var IDBConnection */ |
|
| 33 | + private $con; |
|
| 34 | + /** @var EventMapper */ |
|
| 35 | + private $eventMapper; |
|
| 36 | 36 | |
| 37 | - /** |
|
| 38 | - * {@inheritDoc} |
|
| 39 | - */ |
|
| 40 | - public function setUp() { |
|
| 41 | - parent::setUp(); |
|
| 42 | - $this->con = \OC::$server->getDatabaseConnection(); |
|
| 43 | - $this->eventMapper = new EventMapper($this->con); |
|
| 44 | - } |
|
| 37 | + /** |
|
| 38 | + * {@inheritDoc} |
|
| 39 | + */ |
|
| 40 | + public function setUp() { |
|
| 41 | + parent::setUp(); |
|
| 42 | + $this->con = \OC::$server->getDatabaseConnection(); |
|
| 43 | + $this->eventMapper = new EventMapper($this->con); |
|
| 44 | + } |
|
| 45 | 45 | } |
@@ -29,17 +29,17 @@ |
||
| 29 | 29 | |
| 30 | 30 | class TextMapperTest extends PHPUnit_Framework_TestCase { |
| 31 | 31 | |
| 32 | - /** @var IDBConnection */ |
|
| 33 | - private $con; |
|
| 34 | - /** @var TextMapper */ |
|
| 35 | - private $textMapper; |
|
| 32 | + /** @var IDBConnection */ |
|
| 33 | + private $con; |
|
| 34 | + /** @var TextMapper */ |
|
| 35 | + private $textMapper; |
|
| 36 | 36 | |
| 37 | - /** |
|
| 38 | - * {@inheritDoc} |
|
| 39 | - */ |
|
| 40 | - public function setUp() { |
|
| 41 | - parent::setUp(); |
|
| 42 | - $this->con = \OC::$server->getDatabaseConnection(); |
|
| 43 | - $this->textMapper = new TextMapper($this->con); |
|
| 44 | - } |
|
| 37 | + /** |
|
| 38 | + * {@inheritDoc} |
|
| 39 | + */ |
|
| 40 | + public function setUp() { |
|
| 41 | + parent::setUp(); |
|
| 42 | + $this->con = \OC::$server->getDatabaseConnection(); |
|
| 43 | + $this->textMapper = new TextMapper($this->con); |
|
| 44 | + } |
|
| 45 | 45 | } |
@@ -29,17 +29,17 @@ |
||
| 29 | 29 | |
| 30 | 30 | class DateMapperTest extends PHPUnit_Framework_TestCase { |
| 31 | 31 | |
| 32 | - /** @var IDBConnection */ |
|
| 33 | - private $con; |
|
| 34 | - /** @var DateMapper */ |
|
| 35 | - private $dateMapper; |
|
| 32 | + /** @var IDBConnection */ |
|
| 33 | + private $con; |
|
| 34 | + /** @var DateMapper */ |
|
| 35 | + private $dateMapper; |
|
| 36 | 36 | |
| 37 | - /** |
|
| 38 | - * {@inheritDoc} |
|
| 39 | - */ |
|
| 40 | - public function setUp() { |
|
| 41 | - parent::setUp(); |
|
| 42 | - $this->con = \OC::$server->getDatabaseConnection(); |
|
| 43 | - $this->dateMapper = new DateMapper($this->con); |
|
| 44 | - } |
|
| 37 | + /** |
|
| 38 | + * {@inheritDoc} |
|
| 39 | + */ |
|
| 40 | + public function setUp() { |
|
| 41 | + parent::setUp(); |
|
| 42 | + $this->con = \OC::$server->getDatabaseConnection(); |
|
| 43 | + $this->dateMapper = new DateMapper($this->con); |
|
| 44 | + } |
|
| 45 | 45 | } |
@@ -29,17 +29,17 @@ |
||
| 29 | 29 | |
| 30 | 30 | class NotificationMapperTest extends PHPUnit_Framework_TestCase { |
| 31 | 31 | |
| 32 | - /** @var IDBConnection */ |
|
| 33 | - private $con; |
|
| 34 | - /** @var NotificationMapper */ |
|
| 35 | - private $notificationMapper; |
|
| 32 | + /** @var IDBConnection */ |
|
| 33 | + private $con; |
|
| 34 | + /** @var NotificationMapper */ |
|
| 35 | + private $notificationMapper; |
|
| 36 | 36 | |
| 37 | - /** |
|
| 38 | - * {@inheritDoc} |
|
| 39 | - */ |
|
| 40 | - public function setUp() { |
|
| 41 | - parent::setUp(); |
|
| 42 | - $this->con = \OC::$server->getDatabaseConnection(); |
|
| 43 | - $this->notificationMapper = new NotificationMapper($this->con); |
|
| 44 | - } |
|
| 37 | + /** |
|
| 38 | + * {@inheritDoc} |
|
| 39 | + */ |
|
| 40 | + public function setUp() { |
|
| 41 | + parent::setUp(); |
|
| 42 | + $this->con = \OC::$server->getDatabaseConnection(); |
|
| 43 | + $this->notificationMapper = new NotificationMapper($this->con); |
|
| 44 | + } |
|
| 45 | 45 | } |