public function test__checkNullLot() { /** === Test Data === */ /** === Mock object itself === */ $this->obj = \Mockery::mock(\Praxigento\Odoo\Repo\Agg\Def\Lot::class . '[create]', $this->objArgs); /** === Setup Mocks === */ // $data = $this->_repoEntityLot->getByOdooId(AggLot::NULL_LOT_ID); $this->mRepoEntityLot->shouldReceive('getByOdooId')->once()->andReturn(null); // $this->create($data); $this->obj->shouldReceive('create')->once(); /** === Call and asserts === */ $this->obj->_checkNullLot(); }