public function setUp() { $app = new Chat(); $this->container = $app->getContainer(); $this->container['API'] = $this->getMockBuilder('\\OCA\\Chat\\Core\\API')->disableOriginalConstructor()->getMock(); $this->container['API']->expects($this->any())->method('log')->will($this->returnValue(null)); }
public function setUp() { $app = new Chat(); $this->container = $app->getContainer(); $this->container['ConversationMapper'] = $this->getMockBuilder('\\OCA\\Chat\\OCH\\Db\\ConversationMapper')->disableOriginalConstructor()->getMock(); $this->container['UserOnlineMapper'] = $this->getMockBuilder('\\OCA\\Chat\\OCH\\Db\\UserOnlineMapper')->disableOriginalConstructor()->getMock(); $this->container['PushMessageMapper'] = $this->getMockBuilder('\\OCA\\Chat\\OCH\\Db\\PushMessageMapper')->disableOriginalConstructor()->getMock(); $this->container['UserMapper'] = $this->getMockBuilder('\\OCA\\Chat\\OCH\\Db\\UserMapper')->disableOriginalConstructor()->getMock(); $this->container['API'] = $this->getMockBuilder('\\OCA\\Chat\\Core\\API')->disableOriginalConstructor()->getMock(); $this->container['InitConvMapper'] = $this->getMockBuilder('\\OCA\\Chat\\OCH\\Db\\InitConvMapper')->disableOriginalConstructor()->getMock(); $this->container['API']->expects($this->any())->method('log')->will($this->returnValue(null)); }