protected function addCreatedElement($href) { $testCase = $this; self::$createdContent[$href] = function () use($href, $testCase) { $testCase->sendHttpRequest($testCase->createHttpRequest('DELETE', $href)); }; }