<?php

$I = new SeleniumTester($scenario);
$I->am('a guest');
$I->wantTo('content will be updated if having correct cookie');
$I->amOnPage('/password');
$I->fillField('#password', '123456');
$I->click('Login');
$I->fillField('#content', 'Some demo text that will make all the way to database');
$I->wait(2);
$I->seeInDatabase('manhgiays', ['slug' => 'password', 'content' => 'Some demo text that will make all the way to database']);
<?php

$I = new SeleniumTester($scenario);
$I->am('a guest');
$I->wantTo('ensure no way to update content without a correct cookie');
$I->amOnPage('/password');
$I->seeCurrentUrlEquals('/password/login');
$I->sendPOST('http://manhgiay.dev/password/updateContent', ['content' => 'This will not made it to database']);
$I->seeInDatabase('manhgiays', ['content' => ""]);