* (c) Bernhard Schussek * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ /** * Tests that a value does not equal another. * * @package Lime * @author Bernhard Schussek * @version SVN: $Id: LimeConstraintIsNot.php 23701 2009-11-08 21:23:40Z bschussek $ */ class LimeConstraintIsNot extends LimeConstraint { /** * (non-PHPdoc) * @see constraint/LimeConstraintInterface#evaluate($value) */ public function evaluate($value) { try { LimeTester::create($value)->isnt(LimeTester::create($this->expected)); } catch (LimeAssertionFailedException $e) { throw new LimeConstraintException(sprintf("%s\n must not be\n%s", $e->getActual(), $e->getExpected())); } } }