package worker import ( "os/exec" "testing" "github.com/stretchr/testify/assert" ) func Test_OnStarted(t *testing.T) { cmd := exec.Command("php", "tests/client.php", "broken", "pipes") assert.Nil(t, cmd.Start()) w, err := InitBaseWorker(cmd) assert.Nil(t, w) assert.NotNil(t, err) assert.Equal(t, "can't attach to running process", err.Error()) }