/**
  * Tests setAdapter().
  *
  * @param mixed $adapter
  * @param string|null $exceptionMessage
  * @dataProvider dataProviderSetAdapter
  */
 public function testSetAdapter($adapter, $exceptionMessage)
 {
     $plugin = new Plugin();
     if (!is_null($exceptionMessage)) {
         $this->setExpectedException('InvalidArgumentException', $exceptionMessage);
     }
     $plugin->setAdapter($adapter);
     $this->assertAttributeInstanceOf('PSchwisow\\Phergie\\Plugin\\UrlShorten\\Adapter\\AbstractAdapter', 'adapter', $plugin);
     if (is_object($adapter)) {
         $this->assertAttributeSame($adapter, 'adapter', $plugin);
     }
 }