If a modification is not CARB (California Air Resources Board) approved, it will be an automatic fail of the Visual SMOG test even if it passes emissions. To get the approval costs tens of thousands of dollars.
To get an engine swap approved the truck needs to get an inspection by a State Referee who will go over everything related to the motor, fuel, and emissions equipment. Very strict.
CARB is another way for this state to try and tax the hell out of us, and are making rules and regulations as they please with no oversight or repercussions from other state government bodies.