dimanche 22 novembre 2015

Enhance PHP Test Framework

Can one explain why I get this error in Enhance PHP?

[Line 741 in file EnhanceTestFramework.php] reject_bad_email_addresses - Failed - Expected but was 1

This is my function:

public function reject_bad_email_addresses () {
    $val_wrapper = \Enhance\Core::getCodeCoverageWrapper('Validation');
    $val_email = \Enhance\Core::getScenario($val_wrapper,'validate_email');
    $addresses = array("psn", "p12s@gml.com", "psn@gmail.", "pasa*n@gmail.com");

    foreach ($addresses as $addr) {
        $val_email->with($addr)->expect(false);
    }
    $val_email->verifyExpectations();
}

Aucun commentaire:

Enregistrer un commentaire