Skip to content

Commit

Permalink
Copy Default user info layout provider (from core-library)
Browse files Browse the repository at this point in the history
  • Loading branch information
webeweb committed Apr 27, 2024
1 parent 7e87d71 commit 0d38556
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 0 deletions.
44 changes: 44 additions & 0 deletions lib/common/Provider/Layout/DefaultUserInfoLayoutProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php

declare(strict_types = 1);

/*
* This file is part of the jquery-datatables-bundle package.
*
* (c) 2018 WEBEWEB
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace WBW\Bundle\CommonBundle\Provider\Layout;

/**
* Default user info layout provider.
*
* @author webeweb <https://github.com/webeweb>
* @package WBW\Bundle\CommonBundle\Provider\Layout
*/
class DefaultUserInfoLayoutProvider implements UserInfoLayoutProviderInterface {

/**
* Constructor.
*/
public function __construct() {
// NOTHING TO DO
}

/**
* {@inheritDoc}
*/
public function provideRegisterLink(): ?bool {
return false;
}

/**
* {@inheritDoc}
*/
public function provideResettingLink(): ?bool {
return false;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?php

declare(strict_types = 1);

/*
* This file is part of the jquery-datatables-bundle package.
*
* (c) 2018 WEBEWEB
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace WBW\Bundle\CommonBundle\Tests\Provider\Layout;

use WBW\Bundle\CommonBundle\Provider\Layout\DefaultUserInfoLayoutProvider;
use WBW\Bundle\CommonBundle\Provider\Layout\UserInfoLayoutProviderInterface;
use WBW\Bundle\CommonBundle\Provider\LayoutProviderInterface;
use WBW\Bundle\CommonBundle\Tests\AbstractTestCase;

/**
* Default user info layout provider test.
*
* @author webeweb <https://github.com/webeweb>
* @package WBW\Bundle\CommonBundle\Tests\Layout
*/
class DefaultUserInfoLayoutProviderTest extends AbstractTestCase {

/**
* Test provideRegisterLink()
*
* @return void
*/
public function testProvideRegisterLink(): void {

$obj = new DefaultUserInfoLayoutProvider();

$this->assertFalse($obj->provideRegisterLink());
}

/**
* Test provideResettingLink()
*
* @return void
*/
public function testProvideResettingLink(): void {

$obj = new DefaultUserInfoLayoutProvider();

$this->assertFalse($obj->provideResettingLink());
}

/**
* Test __construct()
*
* @return void
*/
public function test__construct(): void {

$obj = new DefaultUserInfoLayoutProvider();

$this->assertInstanceOf(LayoutProviderInterface::class, $obj);
$this->assertInstanceOf(UserInfoLayoutProviderInterface::class, $obj);
}
}

0 comments on commit 0d38556

Please sign in to comment.