library/QATools/QATools/HtmlElements/Element/AbstractTypifiedElement.php
protected function assertWrappedElement()
	{
		if ( !$this->acceptanceCriteria ) {
			return;
		}

		foreach ( $this->acceptanceCriteria as $criterion ) {
			if ( !$this->isTagNameMatching($criterion) ) {
				continue;
			}

			if ( $this->isAttributeMatching($criterion) ) {
				return;
			}
		}

		$message = 'Wrapped element "%s" does not match "%s" criteria';

		throw new TypifiedElementException(
			sprintf($message, $this->getWrappedElement(), get_class($this)),
			TypifiedElementException::TYPE_INCORRECT_WRAPPED_ELEMENT
		);
	}
protected function assertWrappedElement()
	{
		if ( !$this->acceptanceCriteria ) {
			return;
		}

		foreach ( $this->acceptanceCriteria as $criterion ) {
			if ( !$this->isTagNameMatching($criterion) ) {
				continue;
			}

			if ( $this->isAttributeMatching($criterion) ) {
				return;
			}
		}

		$message = 'Wrapped element "%s" does not match "%s" criteria';

		throw new TypifiedElementException(
			sprintf($message, $this->getWrappedElement(), get_class($this)),
			TypifiedElementException::TYPE_INCORRECT_WRAPPED_ELEMENT
		);
	}
protected function assertWrappedElement ( ) { if ( ! $ this -> acceptanceCriteria ) { return ; } foreach ( $ this -> acceptanceCriteria as $ criterion ) { if ( ! $ this -> isTagNameMatching ( $ criterion ) ) { continue ; } if ( $ this -> isAttributeMatching ( $ criterion ) ) { return ; } } $ message = 'Wrapped element "%s" does not match "%s" criteria' ; throw new TypifiedElementException ( sprintf ( $ message , $ this -> getWrappedElement ( ) , get_class ( $ this ) ) , TypifiedElementException :: TYPE_INCORRECT_WRAPPED_ELEMENT ) ; }
Checks that wrapped element meets the acceptance criteria.

@return void
@throws TypifiedElementException When no criteria matches.
Checks that wrapped element meets the acceptance criteria .