mirror of
https://github.com/elyby/accounts.git
synced 2024-12-27 07:30:18 +05:30
Зафиксирована стабильная версия Codeception 2.1.10
Обновлены моки для будущей совместимости с Codeception 2.2
This commit is contained in:
parent
649216a225
commit
52f115a4e9
@ -31,7 +31,7 @@
|
||||
"yiisoft/yii2-gii": "*",
|
||||
"yiisoft/yii2-faker": "*",
|
||||
"flow/jsonpath": "^0.3.1",
|
||||
"codeception/codeception": "2.1.x-dev",
|
||||
"codeception/codeception": "~2.1.10",
|
||||
"codeception/specify": "*",
|
||||
"codeception/verify": "*"
|
||||
},
|
||||
|
@ -84,7 +84,6 @@ class OauthAuthCodeCest {
|
||||
$I->loggedInAsActiveAccount();
|
||||
|
||||
$I->wantTo('get accept_required if I dom\'t require any scope, but this is first time request');
|
||||
$I->cleanupRedis();
|
||||
$this->route->complete($this->buildQueryParams(
|
||||
'ely',
|
||||
'http://ely.by',
|
||||
|
@ -102,14 +102,21 @@ class ComponentTest extends DbTestCase {
|
||||
$this->component->logout();
|
||||
|
||||
/** @var Component|\PHPUnit_Framework_MockObject_MockObject $component */
|
||||
$component = $this->getMock(Component::class, ['getIsGuest'], [$this->getComponentArguments()]);
|
||||
$component = $this->getMockBuilder(Component::class)
|
||||
->setMethods(['getIsGuest'])
|
||||
->setConstructorArgs([$this->getComponentArguments()])
|
||||
->getMock();
|
||||
|
||||
$component
|
||||
->expects($this->any())
|
||||
->method('getIsGuest')
|
||||
->will($this->returnValue(false));
|
||||
|
||||
/** @var HeaderCollection|\PHPUnit_Framework_MockObject_MockObject $headersCollection */
|
||||
$headersCollection = $this->getMock(HeaderCollection::class, ['get']);
|
||||
$headersCollection = $this->getMockBuilder(HeaderCollection::class)
|
||||
->setMethods(['get'])
|
||||
->getMock();
|
||||
|
||||
$headersCollection
|
||||
->expects($this->any())
|
||||
->method('get')
|
||||
@ -117,7 +124,10 @@ class ComponentTest extends DbTestCase {
|
||||
->will($this->returnValue('Bearer ' . $result->getJwt()));
|
||||
|
||||
/** @var Request|\PHPUnit_Framework_MockObject_MockObject $request */
|
||||
$request = $this->getMock(Request::class, ['getHeaders']);
|
||||
$request = $this->getMockBuilder(Request::class)
|
||||
->setMethods(['getHeaders'])
|
||||
->getMock();
|
||||
|
||||
$request
|
||||
->expects($this->any())
|
||||
->method('getHeaders')
|
||||
@ -166,7 +176,10 @@ class ComponentTest extends DbTestCase {
|
||||
* @return \PHPUnit_Framework_MockObject_MockObject
|
||||
*/
|
||||
private function mockRequest($userIP = '127.0.0.1') {
|
||||
$request = $this->getMock(Request::class, ['getHostInfo', 'getUserIP']);
|
||||
$request = $this->getMockBuilder(Request::class)
|
||||
->setMethods(['getHostInfo', 'getUserIP'])
|
||||
->getMock();
|
||||
|
||||
$request
|
||||
->expects($this->any())
|
||||
->method('getHostInfo')
|
||||
|
@ -100,12 +100,15 @@ class ChangePasswordFormTest extends DbTestCase {
|
||||
|
||||
public function testChangePasswordWithLogout() {
|
||||
/** @var Component|\PHPUnit_Framework_MockObject_MockObject $component */
|
||||
$component = $this->getMock(Component::class, ['getActiveSession'], [[
|
||||
'identityClass' => AccountIdentity::class,
|
||||
'enableSession' => false,
|
||||
'loginUrl' => null,
|
||||
'secret' => 'secret',
|
||||
]]);
|
||||
$component = $this->getMockBuilder(Component::class)
|
||||
->setMethods(['getActiveSession'])
|
||||
->setConstructorArgs([[
|
||||
'identityClass' => AccountIdentity::class,
|
||||
'enableSession' => false,
|
||||
'loginUrl' => null,
|
||||
'secret' => 'secret',
|
||||
]])
|
||||
->getMock();
|
||||
|
||||
/** @var AccountSession $session */
|
||||
$session = AccountSession::findOne($this->accountSessions['admin2']['id']);
|
||||
|
@ -37,7 +37,7 @@ class ChangeUsernameFormTest extends DbTestCase {
|
||||
}
|
||||
|
||||
public function testChangeWithoutChange() {
|
||||
$this->scenario->incomplete('This test is written invalid');
|
||||
$this->markTestSkipped('This test is written invalid');
|
||||
return;
|
||||
|
||||
// TODO: этот тест написан неправильно - запись всё равно добавляется в базу данных, но тест не замечает
|
||||
|
Loading…
Reference in New Issue
Block a user