assertInstanceOf(\Telnyx\Collection::class, $result); } public function testTraitInvalid() { try { $result = DummyInvalidAll::all(); static::fail('Did not raise error'); } catch (\Telnyx\Exception\UnexpectedValueException $e) { static::assertSame( 'Expected type ' . \Telnyx\Collection::class . ', got "Telnyx\Balance" instead.', $e->getMessage() ); } catch (\Exception $e) { static::fail('Unexpected exception: ' . \get_class($e)); } } }