protected function _mockAuthLoggedIn($user = [])
{
$this->Trait->Auth = $this->getMockBuilder('Cake\\Controller\\Component\\AuthComponent')->setMethods(['user', 'identify', 'setUser', 'redirectUrl'])->disableOriginalConstructor()->getMock();
$user += ['id' => '00000000-0000-0000-0000-000000000001', 'password' => '12345'];
$this->Trait->Auth->expects($this->any())->method('identify')->will($this->returnValue($user));
$this->Trait->Auth->expects($this->any())->method('user')->with('id')->will($this->returnValue($user['id']));
}