1 | <?php |
||
16 | class DoctrineDatabaseTest extends TestCase |
||
17 | { |
||
18 | const EXISTING_BOOKMARK_ID = 1; |
||
19 | const EXISTING_BOOKMARK_DATA = [ |
||
20 | 'id' => '1', |
||
21 | 'name' => 'Lorem ipsum dolor', |
||
22 | 'node_id' => '5', |
||
23 | 'user_id' => '14', |
||
24 | ]; |
||
25 | |||
26 | public function setUp() |
||
32 | |||
33 | /** |
||
34 | * @covers \eZ\Publish\Core\Persistence\Legacy\Bookmark\Gateway\DoctrineDatabase::insertBookmark |
||
35 | */ |
||
36 | public function testInsertBookmark() |
||
53 | |||
54 | /** |
||
55 | * @covers \eZ\Publish\Core\Persistence\Legacy\Bookmark\Gateway\DoctrineDatabase::deleteBookmark |
||
56 | */ |
||
57 | public function testDeleteBookmark() |
||
63 | |||
64 | /** |
||
65 | * @covers \eZ\Publish\Core\Persistence\Legacy\Bookmark\Gateway\DoctrineDatabase::loadBookmarkDataById |
||
66 | */ |
||
67 | public function testLoadBookmarkDataById() |
||
74 | |||
75 | /** |
||
76 | * @covers \eZ\Publish\Core\Persistence\Legacy\Bookmark\Gateway\DoctrineDatabase::loadBookmarkDataByUserIdAndLocationId |
||
77 | */ |
||
78 | public function testLoadBookmarkDataByUserIdAndLocationId() |
||
87 | |||
88 | /** |
||
89 | * @covers \eZ\Publish\Core\Persistence\Legacy\Bookmark\Gateway\DoctrineDatabase::loadUserBookmarks |
||
90 | * @dataProvider dataProviderForLoadUserBookmarks |
||
91 | */ |
||
92 | public function testLoadUserBookmarks(int $userId, int $offset, int $limit, array $expected) |
||
96 | |||
97 | /** |
||
98 | * @covers \eZ\Publish\Core\Persistence\Legacy\Bookmark\Gateway\DoctrineDatabase::countUserBookmarks |
||
99 | * @dataProvider dataProviderForLoadUserBookmarks |
||
100 | */ |
||
101 | public function testCountUserBookmarks(int $userId, int $offset, int $limit, array $expected) |
||
105 | |||
106 | public function dataProviderForLoadUserBookmarks(): array |
||
130 | |||
131 | /** |
||
132 | * @covers \eZ\Publish\Core\Persistence\Legacy\Bookmark\Gateway\DoctrineDatabase::locationSwapped |
||
133 | */ |
||
134 | public function testLocationSwapped() |
||
153 | |||
154 | /** |
||
155 | * Return a ready to test DoctrineStorage gateway. |
||
156 | * |
||
157 | * @return \eZ\Publish\Core\Persistence\Legacy\Bookmark\Gateway\DoctrineDatabase |
||
158 | */ |
||
159 | protected function getGateway(): DoctrineDatabase |
||
165 | |||
166 | private function loadBookmark(int $id): array |
||
174 | } |
||
175 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.