public function test_getMageIdByOdooId() { /** === Test Data === */ $ODOO_ID = null; $RESULT = 'result'; /** === Mock object itself === */ $this->obj = \Mockery::mock(\Praxigento\Odoo\Repo\Agg\Def\Lot::class . '[_checkNullLot]', $this->objArgs); /** === Setup Mocks === */ $this->obj->shouldReceive('_checkNullLot')->once(); // $result = $this->_repoEntityLot->getMageIdByOdooId($id); $this->mRepoEntityLot->shouldReceive('getMageIdByOdooId')->once()->with($ODOO_ID)->andReturn($RESULT); /** === Call and asserts === */ $res = $this->obj->getMageIdByOdooId($ODOO_ID); $this->assertEquals($RESULT, $res); }