UserAgentParser\Model\UserAgent::setBot PHP Method

setBot() public method

public setBot ( Bot $bot )
$bot Bot
    public function setBot(Bot $bot)
    {
        $this->bot = $bot;
    }

Usage Example

 public function testBot()
 {
     $ua = new UserAgent();
     $this->assertInstanceOf('UserAgentParser\\Model\\Bot', $ua->getBot());
     $mock = self::createMock('UserAgentParser\\Model\\Bot');
     $ua->setBot($mock);
     $this->assertSame($mock, $ua->getBot());
 }