

Mailer Assertions assertEmailCount(int $count, string $transport = null, string $message = '')Īsserts that the expected number of emails was sent.ĪssertQueuedEmailCount(int $count, string $transport = null, string $message = '')Īsserts that the expected number of emails was queued (e.g. Selector does (not) equal the expected value. ĪssertResponseHasCookie(string $name, string $path = '/', string $domain = null, string $message = '')/ assertResponseNotHasCookie(string $name, string $path = '/', string $domain = null, string $message = '')Īsserts the given cookie is present in the response (optionallyĬhecking for a specific cookie path or domain).ĪssertResponseCookieValueSame(string $name, string $expectedValue, string $path = '/', string $domain = null, string $message = '')Īsserts the given cookie is present and set to the expected value.ĪssertResponseFormatSame(?string $expectedFormat, string $message = '')Īsserts the response format returned by theĪssertResponseIsUnprocessable(string $message = '')Īsserts the response is unprocessable (HTTP status is 422)Ĭrawler Assertions assertSelectorExists(string $selector, string $message = '')/ assertSelectorNotExists(string $selector, string $message = '')Īsserts that the given selector does (not) match at least one elementĪssertSelectorCount(int $expectedCount, string $selector, string $message = '')Īsserts that the expected number of selector elements are in the responseĪssertSelectorTextContains(string $selector, string $text, string $message = '')/ assertSelectorTextNotContains(string $selector, string $text, string $message = '')Īsserts that the first element matching the given selector does (not)ĪssertSelectorTextSame(string $selector, string $text, string $message = '')Īsserts that the contents of the first element matching the givenĪssertPageTitleSame(string $expectedTitle, string $message = '')Īsserts that the element is equal to the given title.ĪssertPageTitleContains(string $expectedTitle, string $message = '')Īsserts that the element contains the given title.ĪssertInputValueSame(string $fieldName, string $expectedValue, string $message = '')/ assertInputValueNotSame(string $fieldName, string $expectedValue, string $message = '')Īsserts that value of the form input with the given name does (not)ĪssertCheckboxChecked(string $fieldName, string $message = '')/ assertCheckboxNotChecked(string $fieldName, string $message = '')Īsserts that the checkbox with the given name is (not) checked.ĪssertFormValue(string $formSelector, string $fieldName, string $value, string $message = '')/ assertNoFormValue(string $formSelector, string $fieldName, string $message = '')Īsserts that value of the field of the first form matching the given assertResponseHeaderSame('content-type', 'application/octet-stream'). ĪssertResponseHeaderSame(string $headerName, string $expectedValue, string $message = '')/ assertResponseHeaderNotSame(string $headerName, string $expectedValue, string $message = '')Īsserts the given header does (not) contain the expected value on the 10.779 - Really Long Operation In 10.Response Assertions assertResponseIsSuccessful(string $message = '')Īsserts that the response was successful (HTTP status is 2xx).ĪssertResponseStatusCodeSame(int $expectedCode, string $message = '')ĪssertResponseRedirects(string $expectedLocation = null, int $expectedCode = null, string $message = '')Īsserts the response is a redirect response (optionally, you can checkĪssertResponseHasHeader(string $headerName, string $message = '')/ assertResponseNotHasHeader(string $headerName, string $message = '')Īsserts the given header is (not) available on the response, e.g. To track the time that passes, just do: recordTime("What We Just Did")įor example: recordTime("Something Else") If (!empty($tStartQ)) echo " In ".$sElapsedSecsQ."s" $sElapsedSecsQ = number_format($tElapsedSecsQ, 3) $sElapsedSecs = str_pad(number_format($tElapsedSecs, 3), 10, " ", STR_PAD_LEFT) Once you copy it to the top of your script, all you do is put the recordTime function calls after each piece you want to time.Ĭopy this to the top of your script file: $tRecordStart = microtime(true)

It formats all the output with 3 decimals of precision. It will do all the calculations for you for how much time has been spent since the start of the script and in each step. But you can easily modify it to HTML if you prefer. It was originally used to track timing of a text-based script, so the output is in text form.

I thought I'd share the function I put together.
