public function testDecribesPropertySettingInMismatchMessage() { $this->assertMismatchDescription('was not set', set('bar'), array('foo' => 'bar')); $this->assertMismatchDescription('was "bar"', notSet('foo'), array('foo' => 'bar')); self::$_classProperty = 'bar'; $this->assertMismatchDescription('was "bar"', notSet('_classProperty'), 'Hamcrest\\Core\\SetTest'); $this->_instanceProperty = 'bar'; $this->assertMismatchDescription('was "bar"', notSet('_instanceProperty'), $this); }
protected function setUp() { self::$_classProperty = null; unset($this->_instanceProperty); }