<commit_before><commit_msg>[Tests] Tests Login::login() no user name, password or token<commit_after><?php
namespace Bolt\Tests;

use Bolt\AccessControl\Login;
use Hautelook\Phpass\PasswordHash;
use Carbon\Carbon;
use Symfony\Component\HttpFoundation\Request;

/**
 * Test for AccessControl\LoginTest
 *
 * @author <NAME> <<EMAIL>>
 */
class LoginTest extends BoltUnitTest
{
    public function tearDown()
    {
        $this->resetDb();
    }

    public function testLoginNoCredentials()
    {
        $app = $this->getApp();
        $this->addDefaultUser($app);
        $logger = $this->getMock('\Bolt\Logger\FlashLogger', ['error']);
        $logger->expects($this->atLeastOnce())
            ->method('error')
            ->with($this->equalTo('Invalid login parameters.'));
        $app['logger.flash'] = $logger;

        $login = new Login($app);
        $request = new Request();

        $login->login($request);
    }
}
{'fraction_non_alphanumeric': 0.16129032258064516, 'fraction_numerical': 0.0, 'mean_word_length': 3.0833333333333335, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4144932', 'n_tokens_mistral': 283, 'n_tokens_neox': 279, 'n_words': 56}