MCPcopy Create free account
hub / github.com/deuill/go-php / TestReceiverDestroy

Function TestReceiverDestroy

engine/receiver_test.go:155–171  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

153}
154
155func TestReceiverDestroy(t *testing.T) {
156 c, _ := e.NewContext()
157 defer c.Destroy()
158
159 r := e.receivers["TestReceiver"]
160 if r == nil {
161 t.Fatalf("Receiver.Destroy(): Could not find defined receiver")
162 }
163
164 r.Destroy()
165 if r.create != nil || r.objects != nil {
166 t.Errorf("Receiver.Destroy(): Did not set internal fields to `nil`")
167 }
168
169 // Attempting to destroy a receiver twice should be a no-op.
170 r.Destroy()
171}
172
173func TestReceiverEnd(t *testing.T) {
174 e.Destroy()

Callers

nothing calls this directly

Calls 3

DestroyMethod · 0.95
NewContextMethod · 0.80
DestroyMethod · 0.45

Tested by

no test coverage detected