Summer Sale! All accounts are 50% off this week.

kenprogrammer's avatar

Testing with Codeception

For those who use Codeception; Why is the following test passing and the specified page doesn't exist?

<?php 
class HelloWorldCest
{
    public function _before(AcceptanceTester $I)
    {
        $I->amOnPage('/forgotten');
    }

    public function _after(AcceptanceTester $I)
    {

    }

    // tests
    public function testEmailField(AcceptanceTester $I)
    {
	
        $I->see('Enter email');

    }
    public function testIncorrectEmail(AcceptanceTester $I)
    {
        $I->fillField('email', '[email protected]');
        $I->click('Continue');
        $I->see('Email is incorrect, try again');
    }
    public function testCorrectEmail(AcceptanceTester $I)
    {
        $I->fillField('email', '[email protected]');
        $I->click('Continue');
        $I->see('Please check your email for next instructions');
    }
}

0 likes
0 replies

Please or to participate in this conversation.