Best Atoum code snippet using calls.get
calls.php
Source:calls.php
...32 ->then33 ->array($calls())->isEmpty()34 ->if($calls[] = $call = new adapter\call(uniqid()))35 ->then36 ->array($calls())->isEqualTo(array($call->getFunction() => array(1 => $call)))37 ->object[$call->getFunction()][1]->isIdenticalTo($call)38 ->if($calls[] = $otherCall = new adapter\call($call->getFunction()))39 ->then40 ->array($calls())->isEqualTo(array($call->getFunction() => array(1 => $call, 2 => $otherCall)))41 ->object[$call->getFunction()][1]->isIdenticalTo($call)42 ->object[$call->getFunction()][2]->isIdenticalTo($otherCall)43 ->object[$otherCall->getFunction()][2]->isIdenticalTo($otherCall)44 ->if($calls[] = $anotherCall = new adapter\call(uniqid()))45 ->then46 ->array($calls())->isEqualTo(array(47 $call->getFunction() => array(1 => $call, 2 => $otherCall),48 $anotherCall->getFunction() => array(3 => $anotherCall)49 )50 )51 ->object[$call->getFunction()][1]->isIdenticalTo($call)52 ->object[$call->getFunction()][2]->isIdenticalTo($otherCall)53 ->object[$otherCall->getFunction()][2]->isIdenticalTo($otherCall)54 ->object[$anotherCall->getFunction()][3]->isIdenticalTo($anotherCall)55 ;56 }57 public function test__toString()58 {59 $this60 ->if($calls = new testedClass())61 ->then62 ->castToString($calls)->isEqualTo($calls->getDecorator()->decorate($calls))63 ;64 }65 public function testCount()66 {67 $this68 ->if($calls = new testedClass())69 ->then70 ->sizeof($calls)->isZero()71 ->if($calls[] = $call1 = new adapter\call(uniqid()))72 ->then73 ->sizeof($calls)->isEqualTo(1)74 ->if($otherCalls = new testedClass())75 ->and($otherCalls[] = $call2 = new adapter\call(uniqid()))76 ->then77 ->sizeof($calls)->isEqualTo(1)78 ->sizeof($otherCalls)->isEqualTo(1)79 ->if($calls[] = $call2 = new adapter\call(uniqid()))80 ->then81 ->sizeof($calls)->isEqualTo(2)82 ->sizeof($otherCalls)->isEqualTo(1)83 ->if($calls[] = $call3 = new adapter\call($call1->getFunction()))84 ->then85 ->sizeof($calls)->isEqualTo(3)86 ->sizeof($otherCalls)->isEqualTo(1)87 ;88 }89 public function testSetDecorator()90 {91 $this92 ->if($calls = new testedClass())93 ->then94 ->object($calls->setDecorator($decorator = new adapter\calls\decorator()))->isIdenticalTo($calls)95 ->object($calls->getDecorator())->isIdenticalTo($decorator)96 ->object($calls->setDecorator())->isIdenticalTo($calls)97 ->object($calls->getDecorator())98 ->isNotIdenticalTo($decorator)99 ->isEqualTo(new adapter\calls\decorator())100 ;101 }102 public function testReset()103 {104 $this105 ->if($calls = new testedClass())106 ->then107 ->object($calls->reset())->isIdenticalTo($calls)108 ->sizeof($calls)->isZero()109 ->if($calls[] = new adapter\call(uniqid()))110 ->then111 ->object($calls->reset())->isIdenticalTo($calls)112 ->sizeof($calls)->isZero()113 ->if($calls[] = $call = new adapter\call(uniqid()))114 ->then115 ->array($calls[$call->getFunction()]->toArray())->isEqualTo(array(2 => $call))116 ;117 }118 public function testAddCall()119 {120 $this121 ->if($calls = new testedClass())122 ->then123 ->object($calls->addCall($call = new adapter\call(uniqid())))->isIdenticalTo($calls)124 ->array($calls[$call->getFunction()]->toArray())125 ->isEqualTo(array(1 => $call))126 ->object[1]->isIdenticalTo($call)127 ;128 }129 public function testRemoveCall()130 {131 $this132 ->if($calls = new testedClass())133 ->then134 ->object($calls->removeCall(new adapter\call(uniqid()), rand(0, PHP_INT_MAX)))->isIdenticalTo($calls)135 ->sizeof($calls)->isZero()136 ->if($calls->addCall($call = new adapter\call(uniqid())))137 ->then138 ->object($calls->removeCall(new adapter\call(uniqid()), rand(1, PHP_INT_MAX)))->isIdenticalTo($calls)139 ->sizeof($calls)->isEqualTo(1)140 ->object($calls->removeCall($call, rand(2, PHP_INT_MAX)))->isIdenticalTo($calls)141 ->sizeof($calls)->isEqualTo(1)142 ->object($calls->removeCall($call, 1))->isIdenticalTo($calls)143 ->sizeof($calls)->isZero()144 ;145 }146 public function testOffsetSet()147 {148 $this149 ->if($calls = new testedClass())150 ->then151 ->exception(function() use ($calls) { $calls[] = new adapter\call(); })152 ->isInstanceOf('mageekguy\atoum\exceptions\logic\invalidArgument')153 ->hasMessage('Function is undefined')154 ->if($calls[] = $call1 = new adapter\call(uniqid()))155 ->then156 ->array($calls[$call1]->toArray())157 ->isEqualTo(array(1 => $call1))158 ->object[1]->isIdenticalTo($call1)159 ->if($calls[] = $call2 = new adapter\call(uniqid(), array()))160 ->then161 ->array($calls[$call1]->toArray())162 ->isEqualTo(array(1 => $call1))163 ->object[1]->isIdenticalTo($call1)164 ->array($calls[$call2]->toArray())165 ->isEqualTo(array(2 => $call2))166 ->object[2]->isIdenticalTo($call2)167 ->if($calls[] = $call3 = new adapter\call($call1->getFunction(), array()))168 ->then169 ->array($calls[$call1]->toArray())170 ->isEqualTo(array(1 => $call1, 3 => $call3))171 ->object[1]->isIdenticalTo($call1)172 ->object[3]->isIdenticalTo($call3)173 ->array($calls[$call2]->toArray())174 ->isEqualTo(array(2 => $call2))175 ->object[2]->isIdenticalTo($call2)176 ->if($calls[] = $call4 = new adapter\call(uniqid()))177 ->then178 ->array($calls[$call1]->toArray())179 ->isEqualTo(array(1 => $call1, 3 => $call3))180 ->object[1]->isIdenticalTo($call1)181 ->object[3]->isIdenticalTo($call3)182 ->array($calls[$call2]->toArray())183 ->isEqualTo(array(2 => $call2))184 ->object[2]->isIdenticalTo($call2)185 ->array($calls[$call4->getFunction()]->toArray())186 ->isEqualTo(array(4 => $call4))187 ->object[4]->isIdenticalTo($call4)188 ->if($calls[$newFunction = uniqid()] = $call5 = new adapter\call(uniqid()))189 ->then190 ->array($calls[$newFunction]->toArray())->isEqualTo(array(5 => $call5))191 ->object[5]->isIdenticalTo($call5)192 ->string($call5->getFunction())->isEqualTo($newFunction)193 ;194 }195 public function testOffsetGet()196 {197 $this198 ->if($calls = new testedClass())199 ->then200 ->array($calls[uniqid()]->toArray())->isEmpty()201 ->if($calls[] = $call1 = new adapter\call(uniqid()))202 ->then203 ->array($calls[$call1->getFunction()]->toArray())204 ->isEqualTo(array(1 => $call1))205 ->object[1]->isIdenticalTo($call1)206 ->array($calls[$call1]->toArray())207 ->isEqualTo(array(1 => $call1))208 ->object[1]->isIdenticalTo($call1)209 ->if($calls[] = $call2 = new adapter\call($call1->getFunction(), array()))210 ->then211 ->array($calls[uniqid()]->toArray())->isEmpty()212 ->array($calls[$call1->getFunction()]->toArray())213 ->isEqualTo(array(1 => $call1, 2 => $call2))214 ->object[1]->isIdenticalTo($call1)215 ->object[2]->isIdenticalTo($call2)216 ->array($calls[$call1]->toArray())217 ->isEqualTo(array(1 => $call1, 2 => $call2))218 ->object[1]->isIdenticalTo($call1)219 ->object[2]->isIdenticalTo($call2)220 ->array($calls[$call2->getFunction()]->toArray())221 ->isEqualTo(array(1 => $call1, 2 => $call2))222 ->object[1]->isIdenticalTo($call1)223 ->object[2]->isIdenticalTo($call2)224 ->array($calls[$call2]->toArray())225 ->isEqualTo(array(2 => $call2))226 ->object[2]->isIdenticalTo($call2)227 ;228 }229 public function testOffsetExists()230 {231 $this232 ->if($calls = new testedClass())233 ->then234 ->boolean(isset($calls[uniqid()]))->isFalse()235 ->if($calls[] = $call = new adapter\call(uniqid()))236 ->then237 ->boolean(isset($calls[uniqid()]))->isFalse()238 ->boolean(isset($calls[$call->getFunction()]))->isTrue()239 ->boolean(isset($calls[$call]))->isTrue()240 ;241 }242 public function testOffsetUnset()243 {244 $this245 ->if($calls = new testedClass())246 ->when(function() use ($calls) { unset($calls[uniqid()]); })247 ->then248 ->sizeof($calls)->isZero249 ->if($calls[] = $call = new adapter\call(uniqid()))250 ->when(function() use ($calls) { unset($calls[uniqid()]); })251 ->then252 ->boolean(isset($calls[$call->getFunction()]))->isTrue()253 ->sizeof($calls)->isEqualTo(1)254 ->when(function() use ($calls, $call) { unset($calls[$call->getFunction()]); })255 ->then256 ->boolean(isset($calls[$call->getFunction()]))->isFalse()257 ->sizeof($calls)->isZero258 ;259 }260 public function testGetIterator()261 {262 $this263 ->if($calls = new testedClass())264 ->then265 ->object($calls->getIterator())->isEqualTo(new \arrayIterator($calls()))266 ;267 }268 public function testToArray()269 {270 $this271 ->if($calls = new testedClass())272 ->then273 ->array($calls->toArray())->isEmpty()274 ->array($calls->toArray(new adapter\call(uniqid())))->isEmpty()275 ->if($calls->addCall($call1 = new adapter\call(uniqid())))276 ->then277 ->array($calls->toArray())->isEqualTo(array(1 => $call1))278 ->array($calls->toArray(new adapter\call(uniqid())))->isEmpty()279 ->array($calls->toArray($call1))->isEqualTo(array(1 => $call1))280 ->if($calls->addCall($call2 = clone $call1))281 ->then282 ->array($calls->toArray())->isEqualTo(array(1 => $call1, 2 => $call2))283 ->array($calls->toArray(new adapter\call(uniqid())))->isEmpty()284 ->array($calls->toArray($call1))->isEqualTo(array(1 => $call1, 2 => $call2))285 ->array($calls->toArray($call2))->isEqualTo(array(1 => $call1, 2 => $call2))286 ->if($calls->addCall($call3 = new adapter\call(uniqid())))287 ->then288 ->array($calls->toArray())->isEqualTo(array(1 => $call1, 2 => $call2, 3 => $call3))289 ->array($calls->toArray(new adapter\call(uniqid())))->isEmpty()290 ->array($calls->toArray($call1))->isEqualTo(array(1 => $call1, 2 => $call2))291 ->array($calls->toArray($call2))->isEqualTo(array(1 => $call1, 2 => $call2))292 ->array($calls->toArray($call3))->isEqualTo(array(3 => $call3))293 ;294 }295 public function testGetEqualTo()296 {297 $this298 ->if($calls = new testedClass())299 ->then300 ->object($calls->getEqualTo(new adapter\call(uniqid())))301 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')302 ->hasSize(0)303 ->if($calls[] = $call1 = new adapter\call(uniqid()))304 ->then305 ->object($calls->getEqualTo(new adapter\call(uniqid())))306 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')307 ->hasSize(0)308 ->object($calls->getEqualTo($call1))309 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')310 ->hasSize(1)311 ->array($calls->getEqualTo($call1)->toArray())312 ->isEqualTo(array(1 => $call1))313 ->if($calls[] = $call2 = new adapter\call($call1->getFunction(), array()))314 ->then315 ->object($calls->getEqualTo(new adapter\call(uniqid())))316 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')317 ->hasSize(0)318 ->object($calls->getEqualTo($call1))319 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')320 ->hasSize(2)321 ->array($calls->getEqualTo($call1)->toArray())322 ->isEqualTo(array(1 => $call1, 2 => $call2))323 ->object($calls->getEqualTo($call2))324 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')325 ->hasSize(1)326 ->array($calls->getEqualTo($call2)->toArray())327 ->isEqualTo(array(2 => $call2))328 ->if($calls[] = $call3 = new adapter\call($call1->getFunction(), array($object = new \mock\object())))329 ->then330 ->object($calls->getEqualTo(new adapter\call(uniqid())))331 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')332 ->hasSize(0)333 ->object($calls->getEqualTo($call1))334 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')335 ->hasSize(3)336 ->array($calls->getEqualTo($call1)->toArray())337 ->isEqualTo(array(1 => $call1, 2 => $call2, 3 => $call3))338 ->object($calls->getEqualTo($call2))339 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')340 ->hasSize(1)341 ->array($calls->getEqualTo($call2)->toArray())342 ->isEqualTo(array(2 => $call2))343 ->object($calls->getEqualTo($call3))344 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')345 ->hasSize(1)346 ->array($calls->getEqualTo($call3)->toArray())347 ->isEqualTo(array(3 => $call3))348 ->if($calls[] = $call4 = new adapter\call($call1->getFunction(), array($object = new \mock\object(), $arg = uniqid())))349 ->then350 ->object($calls->getEqualTo(new adapter\call(uniqid())))351 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')352 ->hasSize(0)353 ->object($calls->getEqualTo($call1))354 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')355 ->hasSize(4)356 ->array($calls->getEqualTo($call1)->toArray())357 ->isEqualTo(array(1 => $call1, 2 => $call2, 3 => $call3, 4 => $call4))358 ->object($calls->getEqualTo($call2))359 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')360 ->hasSize(1)361 ->array($calls->getEqualTo($call2)->toArray())362 ->isEqualTo(array(2 => $call2))363 ->object($calls->getEqualTo($call3))364 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')365 ->hasSize(2)366 ->array($calls->getEqualTo($call3)->toArray())367 ->isEqualTo(array(3 => $call3, 4 => $call4))368 ->object($calls->getEqualTo(new adapter\call($call1->getFunction(), array(clone $object))))369 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')370 ->hasSize(2)371 ->array($calls->getEqualTo($call3)->toArray())372 ->isEqualTo(array(3 => $call3, 4 => $call4))373 ->object($calls->getEqualTo($call4))374 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')375 ->hasSize(1)376 ->array($calls->getEqualTo($call4)->toArray())377 ->isEqualTo(array(4 => $call4))378 ->object($calls->getEqualTo(new adapter\call($call1->getFunction(), array(clone $object, $arg))))379 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')380 ->hasSize(1)381 ->array($calls->getEqualTo($call4)->toArray())382 ->isEqualTo(array(4 => $call4))383 ->if($calls = new testedClass())384 ->and($calls[] = $call5 = new adapter\call(uniqid(), array(1, 2, 3, 4, 5)))385 ->then386 ->object($calls->getEqualTo(new adapter\call($call5->getFunction())))387 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')388 ->hasSize(1)389 ->array($calls->getEqualTo(new adapter\call($call5->getFunction()))->toArray())390 ->isEqualTo(array(5 => $call5))391 ;392 }393 public function testGetIdenticalTo()394 {395 $this396 ->if($calls = new testedClass())397 ->then398 ->object($calls->getIdenticalTo(new adapter\call(uniqid())))399 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')400 ->hasSize(0)401 ->if($calls[] = $call1 = new adapter\call(uniqid()))402 ->then403 ->object($calls->getIdenticalTo(new adapter\call(uniqid())))404 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')405 ->hasSize(0)406 ->object($calls->getIdenticalTo($call1))407 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')408 ->hasSize(1)409 ->array($calls->getIdenticalTo($call1)->toArray())410 ->isEqualTo(array(1 => $call1))411 ->if($calls[] = $call2 = new adapter\call($call1->getFunction(), array()))412 ->then413 ->object($calls->getIdenticalTo(new adapter\call(uniqid())))414 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')415 ->hasSize(0)416 ->object($calls->getIdenticalTo($call1))417 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')418 ->hasSize(2)419 ->array($calls->getIdenticalTo($call1)->toArray())420 ->isEqualTo(array(1 => $call1, 2 => $call2))421 ->object($calls->getIdenticalTo($call2))422 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')423 ->hasSize(1)424 ->array($calls->getIdenticalTo($call2)->toArray())425 ->isEqualTo(array(2 => $call2))426 ->if($calls[] = $call3 = new adapter\call($call1->getFunction(), array($object = new \mock\object())))427 ->then428 ->object($calls->getIdenticalTo(new adapter\call(uniqid())))429 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')430 ->hasSize(0)431 ->object($calls->getIdenticalTo($call1))432 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')433 ->hasSize(3)434 ->array($calls->getIdenticalTo($call1)->toArray())435 ->isEqualTo(array(1 => $call1, 2 => $call2, 3 => $call3))436 ->object($calls->getIdenticalTo($call2))437 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')438 ->hasSize(1)439 ->array($calls->getIdenticalTo($call2)->toArray())440 ->isEqualTo(array(2 => $call2))441 ->object($calls->getIdenticalTo($call3))442 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')443 ->hasSize(1)444 ->array($calls->getIdenticalTo($call3)->toArray())445 ->isEqualTo(array(3 => $call3))446 ->object($calls->getIdenticalTo(new adapter\call($call1->getFunction(), array(clone $object))))447 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')448 ->hasSize(0)449 ->if($calls[] = $call4 = new adapter\call($call1->getFunction(), array($object = new \mock\object(), $arg = uniqid())))450 ->then451 ->object($calls->getIdenticalTo(new adapter\call(uniqid())))452 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')453 ->hasSize(0)454 ->object($calls->getIdenticalTo($call1))455 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')456 ->hasSize(4)457 ->array($calls->getIdenticalTo($call1)->toArray())458 ->isEqualTo(array(1 => $call1, 2 => $call2, 3 => $call3, 4 => $call4))459 ->object($calls->getIdenticalTo($call2))460 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')461 ->hasSize(1)462 ->array($calls->getIdenticalTo($call2)->toArray())463 ->isEqualTo(array(2 => $call2))464 ->object($calls->getIdenticalTo($call3))465 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')466 ->hasSize(1)467 ->array($calls->getIdenticalTo($call3)->toArray())468 ->isEqualTo(array(3 => $call3))469 ->object($calls->getIdenticalTo(new adapter\call($call1->getFunction(), array(clone $object))))470 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')471 ->hasSize(0)472 ->object($calls->getIdenticalTo($call4))473 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')474 ->hasSize(1)475 ->array($calls->getIdenticalTo($call4)->toArray())476 ->isEqualTo(array(4 => $call4))477 ->object($calls->getIdenticalTo(new adapter\call($call1->getFunction(), array(clone $object, $arg))))478 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')479 ->hasSize(0)480 ;481 }482 public function testGetPreviousEqualTo()483 {484 $this485 ->if($calls = new testedClass())486 ->then487 ->object($calls->getPreviousEqualTo(new adapter\call(uniqid()), rand(1, PHP_INT_MAX)))488 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')489 ->hasSize(0)490 ->if($calls[] = $call1 = new adapter\call(uniqid()))491 ->then492 ->object($calls->getPreviousEqualTo(new adapter\call(uniqid()), rand(1, PHP_INT_MAX)))493 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')494 ->hasSize(0)495 ->object($calls->getPreviousEqualTo(new adapter\call($call1), 0))496 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')497 ->hasSize(0)498 ->object($calls->getPreviousEqualTo(new adapter\call($call1), 1))499 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')500 ->hasSize(0)501 ->object($calls->getPreviousEqualTo(new adapter\call($call1), rand(2, PHP_INT_MAX)))502 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')503 ->hasSize(0)504 ->if($calls[] = $call2 = new adapter\call(uniqid(), array()))505 ->then506 ->object($calls->getPreviousEqualTo(new adapter\call(uniqid()), 1))507 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')508 ->hasSize(0)509 ->object($calls->getPreviousEqualTo($call1, 1))510 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')511 ->hasSize(0)512 ->object($previousCalls = $calls->getPreviousEqualTo($call1, 2))513 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')514 ->hasSize(1)515 ->array($previousCalls->toArray())516 ->isEqualTo(array(1 => $call1))517 ->object($calls->getPreviousEqualTo($call2, 1))518 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')519 ->hasSize(0)520 ->object($calls->getPreviousEqualTo($call2, 2))521 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')522 ->hasSize(0)523 ->if($calls[] = $call3 = new adapter\call(uniqid(), array($object = new \mock\object())))524 ->if($calls[] = $call4 = new adapter\call($call3->getFunction(), array(clone $object)))525 ->and($calls[] = $call5 = new adapter\call(uniqid(), array()))526 ->then527 ->object($calls->getPreviousEqualTo(new adapter\call(uniqid()), 1))528 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')529 ->hasSize(0)530 ->object($calls->getPreviousEqualTo($call1, 1))531 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')532 ->hasSize(0)533 ->object($previousCalls = $calls->getPreviousEqualTo($call1, 2))534 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')535 ->hasSize(1)536 ->array($previousCalls->toArray())537 ->isEqualTo(array(1 => $call1))538 ->object($calls->getPreviousEqualTo($call2, 1))539 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')540 ->hasSize(0)541 ->object($calls->getPreviousEqualTo($call2, 2))542 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')543 ->hasSize(0)544 ->object($previousCalls = $calls->getPreviousEqualTo($call3, 4))545 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')546 ->hasSize(1)547 ->array($previousCalls->toArray())548 ->isEqualTo(array(3 => $call3))549 ->object($previousCalls = $calls->getPreviousEqualTo($call4, 4))550 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')551 ->hasSize(1)552 ->array($previousCalls->toArray())553 ->isEqualTo(array(3 => $call3))554 ->object($previousCalls = $calls->getPreviousEqualTo($call3, 5))555 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')556 ->hasSize(2)557 ->array($previousCalls->toArray())558 ->isEqualTo(array(3 => $call3, 4 => $call4))559 ->object($previousCalls = $calls->getPreviousEqualTo($call4, 5))560 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')561 ->hasSize(2)562 ->array($previousCalls->toArray())563 ->isEqualTo(array(3 => $call3, 4 => $call4))564 ;565 }566 public function testGetPreviousIdenticalTo()567 {568 $this569 ->if($calls = new testedClass())570 ->then571 ->object($calls->getPreviousIdenticalTo(new adapter\call(uniqid()), rand(1, PHP_INT_MAX)))572 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')573 ->hasSize(0)574 ->if($calls[] = $call1 = new adapter\call(uniqid()))575 ->then576 ->object($calls->getPreviousIdenticalTo(new adapter\call(uniqid()), rand(1, PHP_INT_MAX)))577 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')578 ->hasSize(0)579 ->object($calls->getPreviousIdenticalTo(new adapter\call($call1), 0))580 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')581 ->hasSize(0)582 ->object($calls->getPreviousIdenticalTo(new adapter\call($call1), 1))583 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')584 ->hasSize(0)585 ->object($calls->getPreviousIdenticalTo(new adapter\call($call1), rand(2, PHP_INT_MAX)))586 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')587 ->hasSize(0)588 ->if($calls[] = $call2 = new adapter\call(uniqid(), array()))589 ->then590 ->object($calls->getPreviousIdenticalTo(new adapter\call(uniqid()), 1))591 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')592 ->hasSize(0)593 ->object($calls->getPreviousIdenticalTo($call1, 1))594 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')595 ->hasSize(0)596 ->object($previousCalls = $calls->getPreviousIdenticalTo($call1, 2))597 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')598 ->hasSize(1)599 ->array($previousCalls->toArray())600 ->isIdenticalTo(array(1 => $call1))601 ->object($calls->getPreviousIdenticalTo($call2, 1))602 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')603 ->hasSize(0)604 ->object($calls->getPreviousIdenticalTo($call2, 2))605 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')606 ->hasSize(0)607 ->if($calls[] = $call3 = new adapter\call(uniqid(), array($object = new \mock\object())))608 ->if($calls[] = $call4 = new adapter\call($call3->getFunction(), array(clone $object)))609 ->and($calls[] = $call5 = new adapter\call(uniqid(), array()))610 ->then611 ->object($calls->getPreviousIdenticalTo(new adapter\call(uniqid()), 1))612 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')613 ->hasSize(0)614 ->object($calls->getPreviousIdenticalTo($call1, 1))615 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')616 ->hasSize(0)617 ->object($previousCalls = $calls->getPreviousIdenticalTo($call1, 2))618 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')619 ->hasSize(1)620 ->array($previousCalls->toArray())621 ->isIdenticalTo(array(1 => $call1))622 ->object($calls->getPreviousIdenticalTo($call2, 1))623 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')624 ->hasSize(0)625 ->object($calls->getPreviousIdenticalTo($call2, 2))626 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')627 ->hasSize(0)628 ->object($previousCalls = $calls->getPreviousIdenticalTo($call3, 4))629 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')630 ->hasSize(1)631 ->array($previousCalls->toArray())632 ->isIdenticalTo(array(3 => $call3))633 ->object($calls->getPreviousIdenticalTo($call4, 4))634 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')635 ->hasSize(0)636 ->object($previousCalls = $calls->getPreviousIdenticalTo($call3, 5))637 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')638 ->hasSize(1)639 ->array($previousCalls->toArray())640 ->isIdenticalTo(array(3 => $call3))641 ->object($previousCalls =$calls->getPreviousIdenticalTo($call4, 5))642 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')643 ->hasSize(1)644 ->array($previousCalls->toArray())645 ->isIdenticalTo(array(4 => $call4))646 ;647 }648 public function testGetPrevious()649 {650 $this651 ->if($calls = new mockedTestedClass())652 ->then653 ->object($calls->getPrevious($call = new adapter\call(uniqid()), $position = rand(1, PHP_INT_MAX)))654 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')655 ->mock($calls)->call('getPreviousEqualTo')->withArguments($call, $position)->once()656 ->object($calls->getPrevious($call = new adapter\call(uniqid()), $position = rand(1, PHP_INT_MAX), true))657 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')658 ->mock($calls)->call('getPreviousIdenticalTo')->withArguments($call, $position)->once()659 ;660 }661 public function testHasPreviousEqualTo()662 {663 $this664 ->if($calls = new testedClass())665 ->then666 ->boolean($calls->hasPreviousEqualTo(new adapter\call(uniqid()), rand(1, PHP_INT_MAX)))->isFalse()667 ->if($calls[] = $call1 = new adapter\call(uniqid()))668 ->then669 ->boolean($calls->hasPreviousEqualTo(new adapter\call(uniqid()), rand(1, PHP_INT_MAX)))->isFalse()670 ->boolean($calls->hasPreviousEqualTo(new adapter\call($call1), 0))->isFalse()671 ->boolean($calls->hasPreviousEqualTo(new adapter\call($call1), 1))->isFalse()672 ->boolean($calls->hasPreviousEqualTo(new adapter\call($call1), rand(2, PHP_INT_MAX)))->isFalse()673 ->if($calls[] = $call2 = new adapter\call(uniqid(), array()))674 ->then675 ->boolean($calls->hasPreviousEqualTo(new adapter\call(uniqid()), 1))->isFalse()676 ->boolean($calls->hasPreviousEqualTo($call1, 1))->isFalse()677 ->boolean($previousCalls = $calls->hasPreviousEqualTo($call1, 2))->isTrue()678 ->boolean($calls->hasPreviousEqualTo($call2, 1))->isFalse()679 ->boolean($calls->hasPreviousEqualTo($call2, 2))->isFalse()680 ->if($calls[] = $call3 = new adapter\call(uniqid(), array($object = new \mock\object())))681 ->if($calls[] = $call4 = new adapter\call($call3->getFunction(), array(clone $object)))682 ->and($calls[] = $call5 = new adapter\call(uniqid(), array()))683 ->then684 ->boolean($calls->hasPreviousEqualTo(new adapter\call(uniqid()), 1))->isFalse()685 ->boolean($calls->hasPreviousEqualTo($call1, 1))->isFalse()686 ->boolean($previousCalls = $calls->hasPreviousEqualTo($call1, 2))->isTrue()687 ->boolean($calls->hasPreviousEqualTo($call2, 1))->isFalse()688 ->boolean($calls->hasPreviousEqualTo($call2, 2))->isFalse()689 ->boolean($previousCalls = $calls->hasPreviousEqualTo($call3, 4))->isTrue()690 ->boolean($previousCalls = $calls->hasPreviousEqualTo($call4, 4))->isTrue()691 ->boolean($previousCalls = $calls->hasPreviousEqualTo($call3, 5))->isTrue()692 ->boolean($previousCalls = $calls->hasPreviousEqualTo($call4, 5))->isTrue()693 ;694 }695 public function testHasPreviousIdenticalTo()696 {697 $this698 ->if($calls = new testedClass())699 ->then700 ->boolean($calls->hasPreviousIdenticalTo(new adapter\call(uniqid()), rand(1, PHP_INT_MAX)))->isFalse()701 ->if($calls[] = $call1 = new adapter\call(uniqid()))702 ->then703 ->boolean($calls->hasPreviousIdenticalTo(new adapter\call(uniqid()), rand(1, PHP_INT_MAX)))->isFalse()704 ->boolean($calls->hasPreviousIdenticalTo(new adapter\call($call1), 0))->isFalse()705 ->boolean($calls->hasPreviousIdenticalTo(new adapter\call($call1), 1))->isFalse()706 ->boolean($calls->hasPreviousIdenticalTo(new adapter\call($call1), rand(2, PHP_INT_MAX)))->isFalse()707 ->if($calls[] = $call2 = new adapter\call(uniqid(), array()))708 ->then709 ->boolean($calls->hasPreviousIdenticalTo(new adapter\call(uniqid()), 1))->isFalse()710 ->boolean($calls->hasPreviousIdenticalTo($call1, 1))->isFalse()711 ->boolean($previousCalls = $calls->hasPreviousIdenticalTo($call1, 2))->isTrue()712 ->boolean($calls->hasPreviousIdenticalTo($call2, 1))->isFalse()713 ->boolean($calls->hasPreviousIdenticalTo($call2, 2))->isFalse()714 ->if($calls[] = $call3 = new adapter\call(uniqid(), array($object = new \mock\object())))715 ->if($calls[] = $call4 = new adapter\call($call3->getFunction(), array(clone $object)))716 ->and($calls[] = $call5 = new adapter\call(uniqid(), array()))717 ->then718 ->boolean($calls->hasPreviousIdenticalTo(new adapter\call(uniqid()), 1))->isFalse()719 ->boolean($calls->hasPreviousIdenticalTo($call1, 1))->isFalse()720 ->boolean($previousCalls = $calls->hasPreviousIdenticalTo($call1, 2))->isTrue()721 ->boolean($calls->hasPreviousIdenticalTo($call2, 1))->isFalse()722 ->boolean($calls->hasPreviousIdenticalTo($call2, 2))->isFalse()723 ->boolean($previousCalls = $calls->hasPreviousIdenticalTo($call3, 4))->isTrue()724 ->boolean($calls->hasPreviousIdenticalTo($call4, 4))->isFalse()725 ->boolean($previousCalls = $calls->hasPreviousIdenticalTo($call3, 5))->isTrue()726 ->boolean($previousCalls =$calls->hasPreviousIdenticalTo($call4, 5))->isTrue()727 ;728 }729 public function testHasPrevious()730 {731 $this732 ->if($calls = new mockedTestedClass())733 ->then734 ->boolean($calls->hasPrevious($call = new adapter\call(uniqid()), $position = rand(1, PHP_INT_MAX)))->isFalse()735 ->mock($calls)->call('hasPreviousEqualTo')->withArguments($call, $position)->once()736 ->boolean($calls->hasPrevious($call = new adapter\call(uniqid()), $position = rand(1, PHP_INT_MAX), true))->isFalse()737 ->mock($calls)->call('hasPreviousIdenticalTo')->withArguments($call, $position)->once()738 ;739 }740 public function testGetAfterEqualTo()741 {742 $this743 ->if($calls = new testedClass())744 ->then745 ->object($calls->getAfterEqualTo(new adapter\call(uniqid()), rand(1, PHP_INT_MAX)))746 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')747 ->hasSize(0)748 ->if($calls[] = $call1 = new adapter\call(uniqid()))749 ->then750 ->object($calls->getAfterEqualTo(new adapter\call(uniqid()), rand(1, PHP_INT_MAX)))751 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')752 ->hasSize(0)753 ->object($calls->getAfterEqualTo(new adapter\call($call1), 0))754 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')755 ->hasSize(0)756 ->object($calls->getAfterEqualTo(new adapter\call($call1), 1))757 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')758 ->hasSize(0)759 ->object($calls->getAfterEqualTo(new adapter\call($call1), rand(2, PHP_INT_MAX)))760 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')761 ->hasSize(0)762 ->if($calls[] = $call2 = new adapter\call(uniqid(), array()))763 ->then764 ->object($calls->getAfterEqualTo(new adapter\call(uniqid()), 1))765 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')766 ->hasSize(0)767 ->object($calls->getAfterEqualTo($call1, 1))768 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')769 ->hasSize(0)770 ->object($calls->getAfterEqualTo($call1, 2))771 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')772 ->hasSize(0)773 ->object($afterCalls = $calls->getAfterEqualTo($call2, 1))774 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')775 ->hasSize(1)776 ->array($afterCalls->toArray())777 ->isEqualTo(array(2 => $call2))778 ->object($calls->getAfterEqualTo($call2, 2))779 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')780 ->hasSize(0)781 ->if($calls[] = $call3 = new adapter\call(uniqid(), array($object = new \mock\object())))782 ->if($calls[] = $call4 = new adapter\call($call3->getFunction(), array(clone $object)))783 ->and($calls[] = $call5 = new adapter\call(uniqid(), array()))784 ->then785 ->object($calls->getAfterEqualTo(new adapter\call(uniqid()), 1))786 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')787 ->hasSize(0)788 ->object($calls->getAfterEqualTo($call1, 1))789 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')790 ->hasSize(0)791 ->object($calls->getAfterEqualTo($call1, 2))792 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')793 ->hasSize(0)794 ->object($afterCalls = $calls->getAfterEqualTo($call2, 1))795 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')796 ->hasSize(1)797 ->array($afterCalls->toArray())798 ->isEqualTo(array(2 => $call2))799 ->object($calls->getAfterEqualTo($call2, 2))800 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')801 ->hasSize(0)802 ->object($afterCalls = $calls->getAfterEqualTo($call3, 1))803 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')804 ->hasSize(2)805 ->array($afterCalls->toArray())806 ->isEqualTo(array(3 => $call3, 4 => $call4))807 ->object($afterCalls = $calls->getAfterEqualTo($call3, 3))808 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')809 ->hasSize(1)810 ->array($afterCalls->toArray())811 ->isEqualTo(array(4 => $call4))812 ->object($afterCalls = $calls->getAfterEqualTo($call4, 1))813 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')814 ->hasSize(2)815 ->array($afterCalls->toArray())816 ->isEqualTo(array(3 => $call3, 4 => $call4))817 ;818 }819 public function testGetAfterIdenticalTo()820 {821 $this822 ->if($calls = new testedClass())823 ->then824 ->object($calls->getAfterIdenticalTo(new adapter\call(uniqid()), rand(1, PHP_INT_MAX)))825 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')826 ->hasSize(0)827 ->if($calls[] = $call1 = new adapter\call(uniqid()))828 ->then829 ->object($calls->getAfterIdenticalTo(new adapter\call(uniqid()), rand(1, PHP_INT_MAX)))830 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')831 ->hasSize(0)832 ->object($calls->getAfterIdenticalTo(new adapter\call($call1), 0))833 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')834 ->hasSize(0)835 ->object($calls->getAfterIdenticalTo(new adapter\call($call1), 1))836 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')837 ->hasSize(0)838 ->object($calls->getAfterIdenticalTo(new adapter\call($call1), rand(2, PHP_INT_MAX)))839 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')840 ->hasSize(0)841 ->if($calls[] = $call2 = new adapter\call(uniqid(), array()))842 ->then843 ->object($calls->getAfterIdenticalTo(new adapter\call(uniqid()), 1))844 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')845 ->hasSize(0)846 ->object($calls->getAfterIdenticalTo($call1, 1))847 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')848 ->hasSize(0)849 ->object($calls->getAfterIdenticalTo($call1, 2))850 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')851 ->hasSize(0)852 ->object($afterCalls = $calls->getAfterIdenticalTo($call2, 1))853 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')854 ->hasSize(1)855 ->array($afterCalls->toArray())856 ->isIdenticalTo(array(2 => $call2))857 ->object($calls->getAfterIdenticalTo($call2, 2))858 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')859 ->hasSize(0)860 ->if($calls[] = $call3 = new adapter\call(uniqid(), array($object = new \mock\object())))861 ->if($calls[] = $call4 = new adapter\call($call3->getFunction(), array(clone $object)))862 ->and($calls[] = $call5 = new adapter\call(uniqid(), array()))863 ->then864 ->object($calls->getAfterIdenticalTo(new adapter\call(uniqid()), 1))865 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')866 ->hasSize(0)867 ->object($calls->getAfterIdenticalTo($call1, 1))868 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')869 ->hasSize(0)870 ->object($calls->getAfterIdenticalTo($call1, 2))871 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')872 ->hasSize(0)873 ->object($afterCalls = $calls->getAfterIdenticalTo($call2, 1))874 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')875 ->hasSize(1)876 ->array($afterCalls->toArray())877 ->isIdenticalTo(array(2 => $call2))878 ->object($calls->getAfterIdenticalTo($call2, 2))879 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')880 ->hasSize(0)881 ->object($afterCalls = $calls->getAfterIdenticalTo($call3, 1))882 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')883 ->hasSize(1)884 ->array($afterCalls->toArray())885 ->isIdenticalTo(array(3 => $call3))886 ->object($afterCalls = $calls->getAfterIdenticalTo($call3, 3))887 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')888 ->hasSize(0)889 ->object($afterCalls = $calls->getAfterIdenticalTo($call4, 1))890 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')891 ->hasSize(1)892 ->array($afterCalls->toArray())893 ->isIdenticalTo(array(4 => $call4))894 ;895 }896 public function testGetAfter()897 {898 $this899 ->if($calls = new mockedTestedClass())900 ->then901 ->object($calls->getAfter($call = new adapter\call(uniqid()), $position = rand(1, PHP_INT_MAX)))902 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')903 ->mock($calls)->call('getAfterEqualTo')->withArguments($call, $position)->once()904 ->object($calls->getAfter($call = new adapter\call(uniqid()), $position = rand(1, PHP_INT_MAX), true))905 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')906 ->mock($calls)->call('getAfterIdenticalTo')->withArguments($call, $position)->once()907 ;908 }909 public function testHasAfterEqualTo()910 {911 $this912 ->if($calls = new testedClass())913 ->then914 ->boolean($calls->hasAfterEqualTo(new adapter\call(uniqid()), rand(1, PHP_INT_MAX)))->isFalse()915 ->if($calls[] = $call1 = new adapter\call(uniqid()))916 ->then917 ->boolean($calls->hasAfterEqualTo(new adapter\call(uniqid()), rand(1, PHP_INT_MAX)))->isFalse()918 ->boolean($calls->hasAfterEqualTo(new adapter\call($call1), 0))->isFalse()919 ->boolean($calls->hasAfterEqualTo(new adapter\call($call1), 1))->isFalse()920 ->boolean($calls->hasAfterEqualTo(new adapter\call($call1), rand(2, PHP_INT_MAX)))->isFalse()921 ->if($calls[] = $call2 = new adapter\call(uniqid(), array()))922 ->then923 ->boolean($calls->hasAfterEqualTo(new adapter\call(uniqid()), 1))->isFalse()924 ->boolean($calls->hasAfterEqualTo($call1, 1))->isFalse()925 ->boolean($calls->hasAfterEqualTo($call1, 2))->isFalse()926 ->boolean($afterCalls = $calls->hasAfterEqualTo($call2, 1))->isTrue()927 ->boolean($calls->hasAfterEqualTo($call2, 2))->isFalse()928 ->if($calls[] = $call3 = new adapter\call(uniqid(), array($object = new \mock\object())))929 ->if($calls[] = $call4 = new adapter\call($call3->getFunction(), array(clone $object)))930 ->and($calls[] = $call5 = new adapter\call(uniqid(), array()))931 ->then932 ->boolean($calls->hasAfterEqualTo(new adapter\call(uniqid()), 1))->isFalse()933 ->boolean($calls->hasAfterEqualTo($call1, 1))->isFalse()934 ->boolean($calls->hasAfterEqualTo($call1, 2))->isFalse()935 ->boolean($afterCalls = $calls->hasAfterEqualTo($call2, 1))->isTrue()936 ->boolean($calls->hasAfterEqualTo($call2, 2))->isFalse()937 ->boolean($afterCalls = $calls->hasAfterEqualTo($call3, 1))->isTrue()938 ->boolean($afterCalls = $calls->hasAfterEqualTo($call3, 3))->isTrue()939 ->boolean($afterCalls = $calls->hasAfterEqualTo($call4, 1))->isTrue()940 ;941 }942 public function testHasAfterIdenticalTo()943 {944 $this945 ->if($calls = new testedClass())946 ->then947 ->boolean($calls->hasAfterIdenticalTo(new adapter\call(uniqid()), rand(1, PHP_INT_MAX)))->isFalse()948 ->if($calls[] = $call1 = new adapter\call(uniqid()))949 ->then950 ->boolean($calls->hasAfterIdenticalTo(new adapter\call(uniqid()), rand(1, PHP_INT_MAX)))->isFalse()951 ->boolean($calls->hasAfterIdenticalTo(new adapter\call($call1), 0))->isFalse()952 ->boolean($calls->hasAfterIdenticalTo(new adapter\call($call1), 1))->isFalse()953 ->boolean($calls->hasAfterIdenticalTo(new adapter\call($call1), rand(2, PHP_INT_MAX)))->isFalse()954 ->if($calls[] = $call2 = new adapter\call(uniqid(), array()))955 ->then956 ->boolean($calls->hasAfterIdenticalTo(new adapter\call(uniqid()), 1))->isFalse()957 ->boolean($calls->hasAfterIdenticalTo($call1, 1))->isFalse()958 ->boolean($calls->hasAfterIdenticalTo($call1, 2))->isFalse()959 ->boolean($afterCalls = $calls->hasAfterIdenticalTo($call2, 1))->isTrue()960 ->boolean($calls->hasAfterIdenticalTo($call2, 2))->isFalse()961 ->if($calls[] = $call3 = new adapter\call(uniqid(), array($object = new \mock\object())))962 ->if($calls[] = $call4 = new adapter\call($call3->getFunction(), array(clone $object)))963 ->and($calls[] = $call5 = new adapter\call(uniqid(), array()))964 ->then965 ->boolean($calls->hasAfterIdenticalTo(new adapter\call(uniqid()), 1))->isFalse()966 ->boolean($calls->hasAfterIdenticalTo($call1, 1))->isFalse()967 ->boolean($calls->hasAfterIdenticalTo($call1, 2))->isFalse()968 ->boolean($afterCalls = $calls->hasAfterIdenticalTo($call2, 1))->isTrue()969 ->boolean($calls->hasAfterIdenticalTo($call2, 2))->isFalse()970 ->boolean($afterCalls = $calls->hasAfterIdenticalTo($call3, 1))->isTrue()971 ->boolean($afterCalls = $calls->hasAfterIdenticalTo($call3, 3))->isFalse()972 ->boolean($afterCalls = $calls->hasAfterIdenticalTo($call4, 1))->isTrue()973 ;974 }975 public function testHasAfter()976 {977 $this978 ->if($calls = new mockedTestedClass())979 ->then980 ->boolean($calls->hasAfter($call = new adapter\call(uniqid()), $position = rand(1, PHP_INT_MAX)))->isFalse()981 ->mock($calls)->call('hasAfterEqualTo')->withArguments($call, $position)->once()982 ->boolean($calls->hasAfter($call = new adapter\call(uniqid()), $position = rand(1, PHP_INT_MAX), true))->isFalse()983 ->mock($calls)->call('hasAfterIdenticalTo')->withArguments($call, $position)->once()984 ;985 }986 public function testGet()987 {988 $this989 ->if($calls = new testedClass())990 ->then991 ->object($calls->get(new adapter\call(uniqid())))992 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')993 ->hasSize(0)994 ->if($calls[] = $call1 = new adapter\call(uniqid()))995 ->then996 ->object($calls->get(new adapter\call(uniqid())))997 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')998 ->hasSize(0)999 ->object($calls->get($call1))1000 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1001 ->hasSize(1)1002 ->array($calls->get($call1)->toArray())1003 ->isEqualTo(array(1 => $call1))1004 ->if($calls[] = $call2 = new adapter\call($call1->getFunction(), array()))1005 ->then1006 ->object($calls->get(new adapter\call(uniqid())))1007 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1008 ->hasSize(0)1009 ->object($calls->get($call1))1010 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1011 ->hasSize(2)1012 ->array($calls->get($call1)->toArray())1013 ->isEqualTo(array(1 => $call1, 2 => $call2))1014 ->object($calls->get($call2))1015 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1016 ->hasSize(1)1017 ->array($calls->get($call2)->toArray())1018 ->isEqualTo(array(2 => $call2))1019 ->if($calls[] = $call3 = new adapter\call($call1->getFunction(), array($object = new \mock\object())))1020 ->then1021 ->object($calls->get(new adapter\call(uniqid())))1022 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1023 ->hasSize(0)1024 ->object($calls->get($call1))1025 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1026 ->hasSize(3)1027 ->array($calls->get($call1)->toArray())1028 ->isEqualTo(array(1 => $call1, 2 => $call2, 3 => $call3))1029 ->object($calls->get($call2))1030 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1031 ->hasSize(1)1032 ->array($calls->get($call2)->toArray())1033 ->isEqualTo(array(2 => $call2))1034 ->object($calls->get($call3))1035 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1036 ->hasSize(1)1037 ->array($calls->get($call3)->toArray())1038 ->isEqualTo(array(3 => $call3))1039 ->if($calls[] = $call4 = new adapter\call($call1->getFunction(), array($object = new \mock\object(), $arg = uniqid())))1040 ->then1041 ->object($calls->get(new adapter\call(uniqid())))1042 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1043 ->hasSize(0)1044 ->object($calls->get($call1))1045 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1046 ->hasSize(4)1047 ->array($calls->get($call1)->toArray())1048 ->isEqualTo(array(1 => $call1, 2 => $call2, 3 => $call3, 4 => $call4))1049 ->object($calls->get($call2))1050 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1051 ->hasSize(1)1052 ->array($calls->get($call2)->toArray())1053 ->isEqualTo(array(2 => $call2))1054 ->object($calls->get($call3))1055 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1056 ->hasSize(2)1057 ->array($calls->get($call3)->toArray())1058 ->isEqualTo(array(3 => $call3, 4 => $call4))1059 ->object($calls->get(new adapter\call($call1->getFunction(), array(clone $object))))1060 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1061 ->hasSize(2)1062 ->array($calls->get($call3)->toArray())1063 ->isEqualTo(array(3 => $call3, 4 => $call4))1064 ->object($calls->get($call4))1065 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1066 ->hasSize(1)1067 ->array($calls->get($call4)->toArray())1068 ->isEqualTo(array(4 => $call4))1069 ->object($calls->get(new adapter\call($call1->getFunction(), array(clone $object, $arg))))1070 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1071 ->hasSize(1)1072 ->array($calls->get($call4)->toArray())1073 ->isEqualTo(array(4 => $call4))1074 ->if($calls = new testedClass())1075 ->then1076 ->object($calls->getIdenticalTo(new adapter\call(uniqid())))1077 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1078 ->hasSize(0)1079 ->if($calls[] = $call5 = new adapter\call(uniqid()))1080 ->then1081 ->object($calls->getIdenticalTo(new adapter\call(uniqid())))1082 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1083 ->hasSize(0)1084 ->object($calls->getIdenticalTo($call5))1085 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1086 ->hasSize(1)1087 ->array($calls->getIdenticalTo($call5)->toArray())1088 ->isEqualTo(array(5 => $call5))1089 ->if($calls[] = $call6 = new adapter\call($call5->getFunction(), array()))1090 ->then1091 ->object($calls->getIdenticalTo(new adapter\call(uniqid())))1092 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1093 ->hasSize(0)1094 ->object($calls->getIdenticalTo($call5))1095 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1096 ->hasSize(2)1097 ->array($calls->getIdenticalTo($call5)->toArray())1098 ->isEqualTo(array(5 => $call5, 6 => $call6))1099 ->object($calls->getIdenticalTo($call6))1100 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1101 ->hasSize(1)1102 ->array($calls->getIdenticalTo($call6)->toArray())1103 ->isEqualTo(array(6 => $call6))1104 ->if($calls[] = $call7 = new adapter\call($call5->getFunction(), array($object = new \mock\object())))1105 ->then1106 ->object($calls->getIdenticalTo(new adapter\call(uniqid())))1107 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1108 ->hasSize(0)1109 ->object($calls->getIdenticalTo($call5))1110 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1111 ->hasSize(3)1112 ->array($calls->getIdenticalTo($call5)->toArray())1113 ->isEqualTo(array(5 => $call5, 6 => $call6, 7 => $call7))1114 ->object($calls->getIdenticalTo($call6))1115 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1116 ->hasSize(1)1117 ->array($calls->getIdenticalTo($call6)->toArray())1118 ->isEqualTo(array(6 => $call6))1119 ->object($calls->getIdenticalTo($call7))1120 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1121 ->hasSize(1)1122 ->array($calls->getIdenticalTo($call7)->toArray())1123 ->isEqualTo(array(7 => $call7))1124 ->object($calls->getIdenticalTo(new adapter\call($call5->getFunction(), array(clone $object))))1125 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1126 ->hasSize(0)1127 ->if($calls[] = $call8 = new adapter\call($call5->getFunction(), array($object = new \mock\object(), $arg = uniqid())))1128 ->then1129 ->object($calls->getIdenticalTo(new adapter\call(uniqid())))1130 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1131 ->hasSize(0)1132 ->object($calls->getIdenticalTo($call5))1133 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1134 ->hasSize(4)1135 ->array($calls->getIdenticalTo($call5)->toArray())1136 ->isEqualTo(array(5 => $call5, 6 => $call6, 7 => $call7, 8 => $call8))1137 ->object($calls->getIdenticalTo($call6))1138 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1139 ->hasSize(1)1140 ->array($calls->getIdenticalTo($call6)->toArray())1141 ->isEqualTo(array(6 => $call6))1142 ->object($calls->getIdenticalTo($call7))1143 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1144 ->hasSize(1)1145 ->array($calls->getIdenticalTo($call7)->toArray())1146 ->isEqualTo(array(7 => $call7))1147 ->object($calls->getIdenticalTo(new adapter\call($call5->getFunction(), array(clone $object))))1148 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1149 ->hasSize(0)1150 ->object($calls->getIdenticalTo($call8))1151 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1152 ->hasSize(1)1153 ->array($calls->getIdenticalTo($call8)->toArray())1154 ->isEqualTo(array(8 => $call8))1155 ->object($calls->getIdenticalTo(new adapter\call($call1->getFunction(), array(clone $object, $arg))))1156 ->isInstanceOf('mageekguy\atoum\test\adapter\calls')1157 ->hasSize(0)1158 ;1159 }1160 public function testGetTimeline()1161 {1162 $this1163 ->if($calls = new testedClass())1164 ->then1165 ->array($calls->getTimeline())->isEmpty()1166 ->if($calls[] = $call1 = new adapter\call(uniqid()))1167 ->then1168 ->array($calls->getTimeline())->isEqualTo(array(1 => $call1))1169 ->if($calls[] = $call2 = new adapter\call(uniqid()))1170 ->then1171 ->array($calls->getTimeline())->isEqualTo(array(1172 1 => $call1,1173 2 => $call21174 )1175 )1176 ->if($otherCalls = new testedClass())1177 ->and($otherCalls[] = $call3 = new adapter\call(uniqid()))1178 ->then1179 ->array($calls->getTimeline())->isEqualTo(array(1180 1 => $call1,1181 2 => $call21182 )1183 )1184 ->if($calls[] = $call4 = new adapter\call(uniqid()))1185 ->then1186 ->array($calls->getTimeline())->isEqualTo(array(1187 1 => $call1,1188 2 => $call2,1189 4 => $call41190 )1191 )1192 ;1193 }1194}...
TraceableAdapterTest.php
Source:TraceableAdapterTest.php
...24 }25 public function testGetItemMissTrace()26 {27 $pool = $this->createCachePool();28 $pool->getItem('k');29 $calls = $pool->getCalls();30 $this->assertCount(1, $calls);31 $call = $calls[0];32 $this->assertSame('getItem', $call->name);33 $this->assertSame(['k' => false], $call->result);34 $this->assertSame(0, $call->hits);35 $this->assertSame(1, $call->misses);36 $this->assertNotEmpty($call->start);37 $this->assertNotEmpty($call->end);38 }39 public function testGetItemHitTrace()40 {41 $pool = $this->createCachePool();42 $item = $pool->getItem('k')->set('foo');43 $pool->save($item);44 $pool->getItem('k');45 $calls = $pool->getCalls();46 $this->assertCount(3, $calls);47 $call = $calls[2];48 $this->assertSame(1, $call->hits);49 $this->assertSame(0, $call->misses);50 }51 public function testGetItemsMissTrace()52 {53 $pool = $this->createCachePool();54 $arg = ['k0', 'k1'];55 $items = $pool->getItems($arg);56 foreach ($items as $item) {57 }58 $calls = $pool->getCalls();59 $this->assertCount(1, $calls);60 $call = $calls[0];61 $this->assertSame('getItems', $call->name);62 $this->assertSame(['k0' => false, 'k1' => false], $call->result);63 $this->assertSame(2, $call->misses);64 $this->assertNotEmpty($call->start);65 $this->assertNotEmpty($call->end);66 }67 public function testHasItemMissTrace()68 {69 $pool = $this->createCachePool();70 $pool->hasItem('k');71 $calls = $pool->getCalls();72 $this->assertCount(1, $calls);73 $call = $calls[0];74 $this->assertSame('hasItem', $call->name);75 $this->assertSame(['k' => false], $call->result);76 $this->assertNotEmpty($call->start);77 $this->assertNotEmpty($call->end);78 }79 public function testHasItemHitTrace()80 {81 $pool = $this->createCachePool();82 $item = $pool->getItem('k')->set('foo');83 $pool->save($item);84 $pool->hasItem('k');85 $calls = $pool->getCalls();86 $this->assertCount(3, $calls);87 $call = $calls[2];88 $this->assertSame('hasItem', $call->name);89 $this->assertSame(['k' => true], $call->result);90 $this->assertNotEmpty($call->start);91 $this->assertNotEmpty($call->end);92 }93 public function testDeleteItemTrace()94 {95 $pool = $this->createCachePool();96 $pool->deleteItem('k');97 $calls = $pool->getCalls();98 $this->assertCount(1, $calls);99 $call = $calls[0];100 $this->assertSame('deleteItem', $call->name);101 $this->assertSame(['k' => true], $call->result);102 $this->assertSame(0, $call->hits);103 $this->assertSame(0, $call->misses);104 $this->assertNotEmpty($call->start);105 $this->assertNotEmpty($call->end);106 }107 public function testDeleteItemsTrace()108 {109 $pool = $this->createCachePool();110 $arg = ['k0', 'k1'];111 $pool->deleteItems($arg);112 $calls = $pool->getCalls();113 $this->assertCount(1, $calls);114 $call = $calls[0];115 $this->assertSame('deleteItems', $call->name);116 $this->assertSame(['keys' => $arg, 'result' => true], $call->result);117 $this->assertSame(0, $call->hits);118 $this->assertSame(0, $call->misses);119 $this->assertNotEmpty($call->start);120 $this->assertNotEmpty($call->end);121 }122 public function testSaveTrace()123 {124 $pool = $this->createCachePool();125 $item = $pool->getItem('k')->set('foo');126 $pool->save($item);127 $calls = $pool->getCalls();128 $this->assertCount(2, $calls);129 $call = $calls[1];130 $this->assertSame('save', $call->name);131 $this->assertSame(['k' => true], $call->result);132 $this->assertSame(0, $call->hits);133 $this->assertSame(0, $call->misses);134 $this->assertNotEmpty($call->start);135 $this->assertNotEmpty($call->end);136 }137 public function testSaveDeferredTrace()138 {139 $pool = $this->createCachePool();140 $item = $pool->getItem('k')->set('foo');141 $pool->saveDeferred($item);142 $calls = $pool->getCalls();143 $this->assertCount(2, $calls);144 $call = $calls[1];145 $this->assertSame('saveDeferred', $call->name);146 $this->assertSame(['k' => true], $call->result);147 $this->assertSame(0, $call->hits);148 $this->assertSame(0, $call->misses);149 $this->assertNotEmpty($call->start);150 $this->assertNotEmpty($call->end);151 }152 public function testCommitTrace()153 {154 $pool = $this->createCachePool();155 $pool->commit();156 $calls = $pool->getCalls();157 $this->assertCount(1, $calls);158 $call = $calls[0];159 $this->assertSame('commit', $call->name);160 $this->assertTrue($call->result);161 $this->assertSame(0, $call->hits);162 $this->assertSame(0, $call->misses);163 $this->assertNotEmpty($call->start);164 $this->assertNotEmpty($call->end);165 }166}...
TraceableCacheTest.php
Source:TraceableCacheTest.php
...24 }25 public function testGetMissTrace()26 {27 $pool = $this->createSimpleCache();28 $pool->get('k');29 $calls = $pool->getCalls();30 $this->assertCount(1, $calls);31 $call = $calls[0];32 $this->assertSame('get', $call->name);33 $this->assertSame(['k' => false], $call->result);34 $this->assertSame(0, $call->hits);35 $this->assertSame(1, $call->misses);36 $this->assertNotEmpty($call->start);37 $this->assertNotEmpty($call->end);38 }39 public function testGetHitTrace()40 {41 $pool = $this->createSimpleCache();42 $pool->set('k', 'foo');43 $pool->get('k');44 $calls = $pool->getCalls();45 $this->assertCount(2, $calls);46 $call = $calls[1];47 $this->assertSame(1, $call->hits);48 $this->assertSame(0, $call->misses);49 }50 public function testGetMultipleMissTrace()51 {52 $pool = $this->createSimpleCache();53 $pool->set('k1', 123);54 $values = $pool->getMultiple(['k0', 'k1']);55 foreach ($values as $value) {56 }57 $calls = $pool->getCalls();58 $this->assertCount(2, $calls);59 $call = $calls[1];60 $this->assertSame('getMultiple', $call->name);61 $this->assertSame(['k1' => true, 'k0' => false], $call->result);62 $this->assertSame(1, $call->misses);63 $this->assertNotEmpty($call->start);64 $this->assertNotEmpty($call->end);65 }66 public function testHasMissTrace()67 {68 $pool = $this->createSimpleCache();69 $pool->has('k');70 $calls = $pool->getCalls();71 $this->assertCount(1, $calls);72 $call = $calls[0];73 $this->assertSame('has', $call->name);74 $this->assertSame(['k' => false], $call->result);75 $this->assertNotEmpty($call->start);76 $this->assertNotEmpty($call->end);77 }78 public function testHasHitTrace()79 {80 $pool = $this->createSimpleCache();81 $pool->set('k', 'foo');82 $pool->has('k');83 $calls = $pool->getCalls();84 $this->assertCount(2, $calls);85 $call = $calls[1];86 $this->assertSame('has', $call->name);87 $this->assertSame(['k' => true], $call->result);88 $this->assertNotEmpty($call->start);89 $this->assertNotEmpty($call->end);90 }91 public function testDeleteTrace()92 {93 $pool = $this->createSimpleCache();94 $pool->delete('k');95 $calls = $pool->getCalls();96 $this->assertCount(1, $calls);97 $call = $calls[0];98 $this->assertSame('delete', $call->name);99 $this->assertSame(['k' => true], $call->result);100 $this->assertSame(0, $call->hits);101 $this->assertSame(0, $call->misses);102 $this->assertNotEmpty($call->start);103 $this->assertNotEmpty($call->end);104 }105 public function testDeleteMultipleTrace()106 {107 $pool = $this->createSimpleCache();108 $arg = ['k0', 'k1'];109 $pool->deleteMultiple($arg);110 $calls = $pool->getCalls();111 $this->assertCount(1, $calls);112 $call = $calls[0];113 $this->assertSame('deleteMultiple', $call->name);114 $this->assertSame(['keys' => $arg, 'result' => true], $call->result);115 $this->assertSame(0, $call->hits);116 $this->assertSame(0, $call->misses);117 $this->assertNotEmpty($call->start);118 $this->assertNotEmpty($call->end);119 }120 public function testTraceSetTrace()121 {122 $pool = $this->createSimpleCache();123 $pool->set('k', 'foo');124 $calls = $pool->getCalls();125 $this->assertCount(1, $calls);126 $call = $calls[0];127 $this->assertSame('set', $call->name);128 $this->assertSame(['k' => true], $call->result);129 $this->assertSame(0, $call->hits);130 $this->assertSame(0, $call->misses);131 $this->assertNotEmpty($call->start);132 $this->assertNotEmpty($call->end);133 }134 public function testSetMultipleTrace()135 {136 $pool = $this->createSimpleCache();137 $pool->setMultiple(['k' => 'foo']);138 $calls = $pool->getCalls();139 $this->assertCount(1, $calls);140 $call = $calls[0];141 $this->assertSame('setMultiple', $call->name);142 $this->assertSame(['keys' => ['k'], 'result' => true], $call->result);143 $this->assertSame(0, $call->hits);144 $this->assertSame(0, $call->misses);145 $this->assertNotEmpty($call->start);146 $this->assertNotEmpty($call->end);147 }148}...
get
Using AI Code Generation
1$call = new Calls();2$call->get();3$call = new Calls();4$call->post();5$call = new Calls();6$call->put();7$call = new Calls();8$call->delete();9$call = new Calls();10$call->patch();11$call = new Calls();12$call->head();13$call = new Calls();14$call->options();15$call = new Calls();16$call->trace();17$call = new Calls();18$call->connect();19$call = new Calls();20$call->custom();21$call = new Calls();22$call->custom();23$call = new Calls();24$call->custom();25$call = new Calls();26$call->custom();27$call = new Calls();28$call->custom();29$call = new Calls();30$call->custom();31$call = new Calls();32$call->custom();33$call = new Calls();34$call->custom();35$call = new Calls();36$call->custom();
get
Using AI Code Generation
1$call = new Calls();2$call->get();3$call = new Calls();4$call->post();5$call = new Calls();6$call->put();7$call = new Calls();8$call->delete();9$call = new Calls();10$call->patch();11$call = new Calls();12$call->head();13$call = new Calls();14$call->options();15$call = new Calls();16$call->get();17$call = new Calls();18$call->post();19$call = new Calls();20$call->put();21$call = new Calls();22$call->delete();23$call = new Calls();24$call->patch();25$call = new Calls();26$call->head();27$call = new Calls();28$call->options();29$call = new Calls();30$call->get();31$call = new Calls();32$call->post();33$call = new Calls();34$call->put();35$call = new Calls();36$call->delete();
get
Using AI Code Generation
1$call = new Calls();2$call->get();3$call = new Calls();4$call->post();5$call = new Calls();6$call->put();7$call = new Calls();8$call->delete();9$call = new Calls();10$call->patch();11$call = new Calls();12$call->head();13$call = new Calls();14$call->options();15$call = new Calls();16$call->connect();17$call = new Calls();18$call->trace();19$call = new Calls();20$call->copy();21$call = new Calls();22$call->link();23$call = new Calls();24$call->unlink();25$call = new Calls();26$call->purge();27$call = new Calls();28$call->lock();29$call = new Calls();30$call->unlock();31$call = new Calls();32$call->propfind();33$call = new Calls();34$call->view();35$call = new Calls();36$call->search();
get
Using AI Code Generation
1require_once('calls.php');2$call = new Calls();3$call->get();4require_once('calls.php');5$call = new Calls();6$call->post();7require_once('calls.php');8$call = new Calls();9$call->delete();10require_once('calls.php');11$call = new Calls();12$call->put();13require_once('calls.php');14$call = new Calls();15$call->patch();16require_once('calls.php');17$call = new Calls();18$call->head();19require_once('calls.php');20$call = new Calls();21$call->options();22require_once('calls.php');23$call = new Calls();24$call->trace();25require_once('calls.php');26$call = new Calls();27$call->connect();28require_once('calls.php');29$call = new Calls();30$call->copy();31require_once('calls.php');32$call = new Calls();33$call->link();34require_once('calls.php');35$call = new Calls();36$call->unlink();37require_once('calls.php');38$call = new Calls();39$call->purge();40require_once('calls.php');41$call = new Calls();42$call->lock();43require_once('calls.php');44$call = new Calls();45$call->unlock();
get
Using AI Code Generation
1$call = new Calls();2$call->get('1');3$call = new Calls();4$call->get('2');5$call = new Calls();6$call->get('1');7$call->get('2');8$call = new Calls();9$call->get('1');10$call->get('2', '3');11$call = new Calls();12$call->get('1', '2');13$call = new Calls();14$call->get('1', '2');15$call->get('1', '3');16$call = new Calls();17$call->get('1', '2');18$call = new Calls();19$call->get('1', '2');20$call->get('1', '3');21$call = new Calls();22$call->get('1', '2');23$call = new Calls();24$call->get('1', '2');25$call->get('1', '3');
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Execute automation tests with get on a cloud-based Grid of 3000+ real browsers and operating systems for both web and mobile applications.
Test now for FreeGet 100 minutes of automation test minutes FREE!!