MCPcopy Index your code
hub / github.com/php/frankenphp / TestStartAndStopTheMainThreadWithOneInactiveThread

Function TestStartAndStopTheMainThreadWithOneInactiveThread

phpmainthread_test.go:28–39  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

26}
27
28func TestStartAndStopTheMainThreadWithOneInactiveThread(t *testing.T) {
29 _, err := initPHPThreads(1, 1, nil) // boot 1 thread
30 assert.NoError(t, err)
31
32 assert.Len(t, phpThreads, 1)
33 assert.Equal(t, 0, phpThreads[0].threadIndex)
34 assert.True(t, phpThreads[0].state.Is(state.Inactive))
35
36 drainPHPThreads()
37
38 assert.Nil(t, phpThreads)
39}
40
41func TestTransitionRegularThreadToWorkerThread(t *testing.T) {
42 setupGlobals(t)

Callers

nothing calls this directly

Calls 3

initPHPThreadsFunction · 0.85
drainPHPThreadsFunction · 0.85
IsMethod · 0.80

Tested by

no test coverage detected