Among the viands placed before the king were swine's flesh and other meats which were declared unclean by the law of Moses, and which the Hebrews had been expressly forbidden to eat. Here Daniel was brought to a severe test. Should he adhere to the teachings of his fathers concerning meats and drinks, and offend the king, and probably lose not only his position but his life? or should he disregard the commandment of the Lord, and retain the favor of the king, thus securing great intellectual advantages and the most flattering worldly prospects? SL 19.2
Daniel did not long hesitate. He decided to stand firm in his integrity, let the result be what it might. He “purposed in his heart that he would not defile himself with the portion of the king's meat, nor with the wine which he drank” (Daniel 1:8). SL 19.3