If you want to test only the I2S part of the audio shield, create a do-nothing program with an instance of I2S input, so cause Teensy to transmit the 3 clock signals, and use I2C to enable the SGTL5000 chip. Then just short pins 7 and 8 (assuming using Rev D / D2 audio shield for Teensy 4.x) so the data it's ADC transmitting gets connected to its input for its DAC.
If you want to test I2S in both the audio shield and Teensy, create both I2S input and output and 2 connections to pass the input data to the output. In Arduino, click File > Examples > Audio > HardwareTesting > PassThroughStereo for ready to use code.
That example program should work fine for the 1st case if you just delete the AudioOutputI2S and 2 AudioConnection instances.