/**
  * accepts only objects which provide canonicalize
  */
 public function testStringVR_Encoder()
 {
     $svr = new StringValidationRule('A_String', null, '^[abc]+$');
     $this->assertNull($svr->setEncoder(new DefaultEncoder()));
     $this->setExpectedException('InvalidArgumentException');
     $svr->setEncoder(new Base64Codec());
 }