Am I remembering something wrong? I distinctly remember that if the PC casts a spell (such as Longstrider) then the pet gets it as well, as long as the pet is within 5' when the spell is cast.
I am looking in my CRB and not seeing this.
Herolab (not perfect, I know) also thinks Share Spells grants spell benefits to the pet as well as the PC.
If it does work as I remember (which I hope) a page reference would be really nice.