Skip to content
Snippets Groups Projects
Commit 877c6803 authored by Sascha Löffler's avatar Sascha Löffler Committed by Christian Kuhn
Browse files

[TASK] Make AbstractUserAuthenticationTest notice free

Resolves: #84423
Releases: master
Change-Id: I80afac2368be1c36053ad89edb129e56175ba2a8
Reviewed-on: https://review.typo3.org/56294


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 7884b11a
Branches
Tags
No related merge requests found
<?php
declare(strict_types = 1);
namespace TYPO3\CMS\Core\Tests\Unit\Authentication;
/*
......@@ -14,30 +15,30 @@ namespace TYPO3\CMS\Core\Tests\Unit\Authentication;
* The TYPO3 project - inspiring people to share!
*/
use Doctrine\DBAL\Query\QueryBuilder as DoctrineQueryBuilder;
use Prophecy\Argument;
use Prophecy\Prophecy\ObjectProphecy;
use TYPO3\CMS\Core\Authentication\AbstractUserAuthentication;
use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder;
use TYPO3\CMS\Core\Database\Query\QueryBuilder;
use TYPO3\CMS\Core\Tests\Unit\Database\Mocks\MockPlatform;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
/**
* Testcase for class \TYPO3\CMS\Core\Authentication\AbstractUserAuthentication
*/
class AbstractUserAuthenticationTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
class AbstractUserAuthenticationTest extends UnitTestCase
{
/**
* Subject is not notice free, disable E_NOTICES
*/
protected static $suppressNotices = true;
/**
* @test
*/
public function getAuthInfoArrayReturnsEmptyPidListIfNoCheckPidValueIsGiven()
{
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
/** @var Connection|ObjectProphecy $connection */
$connection = $this->prophesize(Connection::class);
$connection->getDatabasePlatform()->willReturn(new MockPlatform());
......@@ -48,7 +49,7 @@ class AbstractUserAuthenticationTest extends \TYPO3\TestingFramework\Core\Unit\U
$queryBuilder = new QueryBuilder(
$connection->reveal(),
null,
$this->prophesize(\Doctrine\DBAL\Query\QueryBuilder::class)->reveal()
$this->prophesize(DoctrineQueryBuilder::class)->reveal()
);
/** @var ConnectionPool|ObjectProphecy $connection */
......@@ -58,7 +59,7 @@ class AbstractUserAuthenticationTest extends \TYPO3\TestingFramework\Core\Unit\U
GeneralUtility::addInstance(ConnectionPool::class, $connectionPool->reveal());
/** @var $mock \TYPO3\CMS\Core\Authentication\AbstractUserAuthentication */
$mock = $this->getMockBuilder(\TYPO3\CMS\Core\Authentication\AbstractUserAuthentication::class)
$mock = $this->getMockBuilder(AbstractUserAuthentication::class)
->setMethods(['dummy'])
->getMock();
$mock->checkPid = true;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment