public function testValueIsObfuscatedWheObscureValueFlagIsTrue() { $this->validator->setValueObscured(true); $this->assertFalse($this->validator->isValid('foobar')); $messages = $this->validator->getMessages(); $this->assertTrue(isset($messages['fooMessage'])); $message = $messages['fooMessage']; $this->assertNotContains('foobar', $message); $this->assertContains('******', $message); }