(t *testing.T, opts *testOptions)
| 462 | testPersistentObject(t, &testOptions{workerScript: "persistent-object.php"}) |
| 463 | } |
| 464 | func testPersistentObject(t *testing.T, opts *testOptions) { |
| 465 | runTest(t, func(handler func(http.ResponseWriter, *http.Request), _ *httptest.Server, i int) { |
| 466 | body, _ := testGet(fmt.Sprintf("http://example.com/persistent-object.php?i=%d", i), handler, t) |
| 467 | |
| 468 | assert.Equal(t, fmt.Sprintf(`request: %d |
| 469 | class exists: 1 |
| 470 | id: obj1 |
| 471 | object id: 1`, i), body) |
| 472 | }, opts) |
| 473 | } |
| 474 | |
| 475 | func TestAutoloader_module(t *testing.T) { testAutoloader(t, nil) } |
| 476 | func TestAutoloader_worker(t *testing.T) { |
no test coverage detected