Привет ребята У меня есть проблема с codeception,
он не работает правильно, и я использую все тот же код
, что есть видео о larabook с нуля
Это мой код в signUpCept.phpLarabook Auth :: Проверка() не работает
$I = new FunctionalTester($scenario);
$I->am('a guest');
$I->wantTo('Sign up for a Larabook account');
$I->amOnPage('/');
$I->click('Sign Up!');
$I->seeCurrentUrlEquals('/register');
$I->fillField('Username:', 'JohnDoe');
$I->fillField('Email:', '[email protected]');
$I->fillField('Password:', 'demo');
$I->fillField('Password Confirmation:', 'demo');
$I->click('Sign Up');
$I->seeCurrentUrlEquals('');
$I->see('Welcome to Larabook!');
$I->seeRecord('users',[
'username' => 'JohnDoe',
'email' => '[email protected]',
'password' => 'demo'
]);
$I->assertTrue(Auth::check());
Это мой RegistrationController.php
class RegistrationController extends \BaseController {
/**
* Show a form to register the user.
*
* @return Response
*/
public function create()
{
return View::make('registration.create');
}
/**
* Creating a new Larbook user.
*
* @return Response
*/
public function store()
{
$user = User::create(
Input::only('username', 'email', 'password')
);
Auth::login($user);
return Redirect::home();
}
}
И это ошибка я получаю
Functional Tests (1) ----------------------------------------------------------------------------------------
Sign up for a larabook account (SignUpCept) Fail
-------------------------------------------------------------------------------------------------------------
Time: 6.04 seconds, Memory: 25.50Mb
There was 1 failure:
---------
1) Failed to sign up for a larabook account in SignUpCept (tests/functional/SignUpCept.php)
Step I assert true false
Fail Failed asserting that false is true.
Scenario Steps:
13. $I->assertTrue(false) at tests/functional/SignUpCept.php:28
12. $I->seeRecord("users",{"username":"JohnDoe","email":"[email protected]","password":"demo"}) at tests/functional/SignUpCept.php:26
11. $I->see("Welcome to Larabook!") at tests/functional/SignUpCept.php:20
10. $I->seeCurrentUrlEquals("") at tests/functional/SignUpCept.php:19
9. $I->click("Sign Up") at tests/functional/SignUpCept.php:17
8. $I->fillField("Password Confirmation:","demo") at tests/functional/SignUpCept.php:15
FAILURES!
Tests: 1, Assertions: 4, Failures: 1.
Вы когда-нибудь это выясняли? У меня такая же проблема. –