public function theXmlAttributeShouldNotBeEqualTo($attribute, $element, $text) { $actual = $this->theXmlAttributeShouldExist($attribute, $element); if ($text === $actual) { throw new \Exception("The attribute value is '{$actual}'"); } }