mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Check for null values when getting CMS tab elements
This commit is contained in:
parent
2dd5bb4d19
commit
a8b3da6958
@ -243,7 +243,9 @@ class CmsUiContext implements Context
|
||||
*/
|
||||
public function theHeaderTabShouldBeActive($text)
|
||||
{
|
||||
assertTrue($this->getCmsTabElement($text)->hasClass('active'));
|
||||
$element = $this->getCmsTabElement($text);
|
||||
assertNotNull($element);
|
||||
assertTrue($element->hasClass('active'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -251,7 +253,9 @@ class CmsUiContext implements Context
|
||||
*/
|
||||
public function theHeaderTabShouldNotBeActive($text)
|
||||
{
|
||||
assertFalse($this->getCmsTabElement($text)->hasClass('active'));
|
||||
$element = $this->getCmsTabElement($text);
|
||||
assertNotNull($element);
|
||||
assertFalse($element->hasClass('active'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user