$this->user =
new InMemoryUser('wouter', null
);
$this->token =
$this->
createMock(TokenInterface::
class);
$this->token->
expects($this->
any())->
method('getUser'
)->
willReturn($this->user
);
$this->response =
$this->
createMock(Response::
class);
} /**
* @dataProvider provideSupportsData
*/
public function testSupports($authenticators,
$result) { $manager =
$this->
createManager($authenticators);
$this->
assertEquals($result,
$manager->
supports($this->request
));
} public static function provideSupportsData() { yield [[self::
createDummySupportsAuthenticator(null
), self::
createDummySupportsAuthenticator(null
)], null
];
yield [[self::
createDummySupportsAuthenticator(null
), self::
createDummySupportsAuthenticator(false
)], null
];
yield [[self::
createDummySupportsAuthenticator(null
), self::
createDummySupportsAuthenticator(true
)], true
];
yield [[self::
createDummySupportsAuthenticator(true
), self::
createDummySupportsAuthenticator(false
)], true
];