Skip to content

Commit

Permalink
prepare to release
Browse files Browse the repository at this point in the history
  • Loading branch information
skie committed Jan 24, 2022
1 parent cfe14e8 commit c1bb3b4
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 24 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
Changelog
=========
Releases for CakePHP 4.3

* 11.0.0
* Switched tests to new cakephp schema
* Update to PHPUnit 9.5


Releases for CakePHP 4
-------------
* 9.2.0
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"source": "https://github.com/CakeDC/users"
},
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=7.2.0",
"cakephp/cakephp": "^4.0",
Expand Down
4 changes: 2 additions & 2 deletions tests/Fixture/UsersFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function init(): void
'role' => 'admin',
'created' => '2015-06-24 17:33:54',
'modified' => '2015-06-24 17:33:54',
'additional_data' => json_encode([
'additional_data' => [
'u2f_registration' => [
'keyHandle' => 'fake key handle',
'publicKey' => 'afdoaj0-23u423-ad ujsf-as8-0-afsd',
Expand All @@ -70,7 +70,7 @@ public function init(): void
'otherUI' => null,
],
],
]),
],
'last_login' => '2015-06-24 17:33:54',
],
[
Expand Down
28 changes: 6 additions & 22 deletions tests/TestCase/Controller/Traits/Webauthn2faTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,10 @@ public function testWebauthn2faIsRegister()
$this->_mockSession([
'Webauthn2fa.User' => $user,
]);
$this->Trait->expects($this->at(1))
->method('set')
->with(
$this->equalTo('isRegister'),
$this->equalTo(true)
);
$this->Trait->expects($this->at(2))
$this->Trait
->expects($this->exactly(2))
->method('set')
->with(
$this->equalTo('username'),
$this->equalTo('user-2')
);
->withConsecutive(['isRegister', true], ['username', 'user-2']);
$this->Trait->webauthn2fa();
$this->assertSame(
$user,
Expand Down Expand Up @@ -146,18 +138,10 @@ public function testWebauthn2faDontRequireRegister()
$this->_mockSession([
'Webauthn2fa.User' => $user,
]);
$this->Trait->expects($this->at(1))
->method('set')
->with(
$this->equalTo('isRegister'),
$this->equalTo(false)
);
$this->Trait->expects($this->at(2))
$this->Trait
->expects($this->exactly(2))
->method('set')
->with(
$this->equalTo('username'),
$this->equalTo('user-1')
);
->withConsecutive(['isRegister', false], ['username', 'user-1']);
$this->Trait->webauthn2fa();
$this->assertSame(
$user,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ public function testFindAllForUserEntity()
*/
public function testSaveCredentialSource()
{
\Cake\Database\TypeFactory::map('json', \Cake\Database\Type\JsonType::class);

$publicKeyCredentialId = '12b37486-9299-4331-ac33-85b2d985b6fe';
$userId = '00000000-0000-0000-0000-000000000001';
$credentialData = [
Expand Down

0 comments on commit c1bb3b4

Please sign in to comment.