Abstract Class Misago\Unit\Assertions\DomAssertions

Inheritence

Extends:
ModelAssertions

Methods

Public instance methods

assert_dom_equal($expected, $actual, $message='')

HTML strings must be identical, up to attributes.

assert_dom_not_equal($expected, $actual, $message='')

Negated form of assert_dom_equal.

Protected instance methods

assert_select($selector, $equality=true, $message='')

Makes tests on DOM using CSS selectors.

Attention: HTML/XML must be well formed.

assert_select('one or more forms', 'form')
assert_select('no forms', 'form', false)
assert_select('must contain four articles', 'article', 4)
assert_select('2 articles with class foo', 'article.foo', 2)
assert_select('title element must contains "welcome" text', 'head title', 'welcome') 

css_select($html, $selector)

Returns an array of elements matching given selector.