mirror of
https://github.com/silverstripe/silverstripe-contentreview
synced 2024-10-22 17:05:47 +02:00
Compare commits
2 Commits
b5e39a5fcb
...
3bdf224edb
Author | SHA1 | Date | |
---|---|---|---|
|
3bdf224edb | ||
|
840a0db70c |
@ -133,26 +133,6 @@ class ContentReviewNotificationTest extends SapphireTest
|
|||||||
DBDatetime::clear_mock_now();
|
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
|
* Deletes all pages except those passes in to the $ids parameter
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user