public function test_getQueryToSelectCount() { /** === Setup Mocks === */ // $result = $this->_repoWrhsAggWarehouse->getQueryToSelectCount(); $mQuery = $this->_mockDbSelect(); $this->mRepoWrhsAggWarehouse->shouldReceive('getQueryToSelectCount')->once()->andReturn($mQuery); // $tblOdoo = [$asOdoo => $this->_resource->getTableName(EntityWarehouse::ENTITY_NAME)]; $this->mResource->shouldReceive('getTableName')->once(); // $result->joinLeft($tblOdoo, $on, $cols); $mQuery->shouldReceive('joinLeft')->once(); /** === Call and asserts === */ $res = $this->obj->getQueryToSelectCount(); $this->assertTrue($res instanceof \Magento\Framework\DB\Select); }
/** @inheritdoc */ public function getQueryToSelectCount() { $result = $this->_factorySelect->getQueryToSelectCount(); return $result; }