Skip to content

Commit dd187f3

Browse files
committed
[Rector] Apply PHPUnitSetList::REMOVE_MOCKS
1 parent 764b1e0 commit dd187f3

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

rector.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
LevelSetList::UP_TO_PHP_74,
5858
PHPUnitSetList::PHPUNIT_SPECIFIC_METHOD,
5959
PHPUnitSetList::PHPUNIT_80,
60+
PHPUnitSetList::REMOVE_MOCKS,
6061
]);
6162

6263
$rectorConfig->parallel();

tests/system/Database/Forge/CreateTableTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function testCreateTableWithExists()
2727
->setConstructorArgs([[]])
2828
->onlyMethods(['listTables'])
2929
->getMock();
30-
$dbMock->expects($this->any())
30+
$dbMock
3131
->method('listTables')
3232
->willReturn(['foo']);
3333

@@ -53,7 +53,7 @@ public function testCreateTableWithDefaultRawSql()
5353
->setConstructorArgs([[]])
5454
->onlyMethods(['query'])
5555
->getMock();
56-
$dbMock->expects($this->any())
56+
$dbMock
5757
->method('query')
5858
->with($sql)
5959
->willReturn(true);

tests/system/Debug/Toolbar/Collectors/DatabaseTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ final class DatabaseTest extends CIUnitTestCase
2323
public function testDisplay(): void
2424
{
2525
/** @var MockObject&Query $query */
26-
$query = $this->getMockBuilder(Query::class)
27-
->disableOriginalConstructor()
28-
->getMock();
26+
$query = $this->createMock(Query::class);
2927

3028
// set mock returns
3129
$query->method('getQuery')->willReturn('SHOW TABLES;');

0 commit comments

Comments
 (0)