Compare commits

..

2 Commits

Author SHA1 Message Date
Guy Sartorelli
3bdf224edb
Merge 840a0db70c into 4b8f7586d2 2024-09-24 22:31:17 +00:00
Guy Sartorelli
840a0db70c
ENH Use symfony/validation logic 2024-09-25 10:31:09 +12:00

View File

@ -133,26 +133,6 @@ class ContentReviewNotificationTest extends SapphireTest
DBDatetime::clear_mock_now();
}
/**
* Test that provided email is valid
*/
public function testIsValidEmail()
{
$class = new ReflectionClass(ContentReviewEmails::class);
$method = $class->getMethod('isValidEmail');
$method->setAccessible(true);
$member = $this->objFromFixture(Member::class, 'author');
$task = new ContentReviewEmails();
$this->assertTrue($method->invokeArgs($task, [$member->Email]));
$this->assertTrue($method->invokeArgs($task, ['correct.email@example.com']));
$this->assertFalse($method->invokeArgs($task, [null]));
$this->assertFalse($method->invokeArgs($task, ['broken.email']));
$this->assertFalse($method->invokeArgs($task, ['broken@email']));
}
/**
* Deletes all pages except those passes in to the $ids parameter
*