Skip to content

Commit 6eea5e4

Browse files
committed
[TASK] Updating unit tests
1 parent 44d649e commit 6eea5e4

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

Tests/Unit/Service/Configuration/TcaServiceTest.php

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,22 +267,30 @@ public function testGetDeletedFieldReturnsConfiguredField()
267267
}
268268

269269
/**
270-
* @covers ::getAllTableNamesWithPidField
270+
* @covers ::getAllTableNamesWithPidAndUidField
271271
*/
272-
public function testGetAllTableNamesWithPidFieldReturnsExpectedTables()
272+
public function testGetAllTableNamesWithPidAndUidFieldReturnsExpectedTables()
273273
{
274274
/** @var \PHPUnit_Framework_MockObject_MockObject|TcaService $tcaService */
275275
$tcaService = $this->getMockBuilder(TcaService::class)->setMethods(['getDatabaseSchema'])->getMock();
276276

277277
$databaseSchema = [
278278
'foo' => [
279279
'pid' => [],
280+
'uid' => []
280281
],
281282
'bar' => [
282283
'pid' => [],
284+
'uid' => []
283285
],
284286
'baz' => [
285-
'uid' => [],
287+
'tstamp' => []
288+
],
289+
'boo' => [
290+
'pid' => []
291+
],
292+
'far' => [
293+
'uid' => []
286294
],
287295
];
288296

@@ -293,26 +301,32 @@ public function testGetAllTableNamesWithPidFieldReturnsExpectedTables()
293301
}
294302

295303
/**
296-
* @covers ::getAllTableNamesWithPidField
297-
* @depends testGetAllTableNamesWithPidFieldReturnsExpectedTables
304+
* @covers ::getAllTableNamesWithPidAndUidField
305+
* @depends testGetAllTableNamesWithPidAndUidFieldReturnsExpectedTables
298306
*/
299-
public function testGetAllTableNamesWithPidFieldReturnsExpectedTablesExceptExcludedTables()
307+
public function testGetAllTableNamesWithPidAndUidFieldReturnsExpectedTablesExceptExcludedTables()
300308
{
301309
/** @var \PHPUnit_Framework_MockObject_MockObject|TcaService $tcaService */
302310
$tcaService = $this->getMockBuilder(TcaService::class)->setMethods(['getDatabaseSchema'])->getMock();
303311

304312
$databaseSchema = [
305313
'foo' => [
306314
'pid' => [],
315+
'uid' => []
307316
],
308317
'bar' => [
309318
'pid' => [],
319+
'uid' => []
310320
],
311321
'baz' => [
312322
'uid' => [],
313323
],
324+
'faz' => [
325+
'pid' => [],
326+
],
314327
'boo' => [
315328
'pid' => [],
329+
'uid' => []
316330
],
317331
];
318332

0 commit comments

Comments
 (0)