I am starting with PHP and wrote a unit tests to see if I get things right.
<?php
use PHPUnit\Framework\TestCase;
class MyTest extends TestCase {
public function testEmailWtf() {
$this->assertTrue(filter_var("me@gmail.com", FILTER_VALIDATE_EMAIL));
}
}
?>
This fails, but I don't understand why.
1) MyTest::testEmailWtf
Failed asserting that 'me@gmail.com' is true.
Why does this not accept a valid email address?