repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated-threw/call-never/verification.php | test/fixture/verification/generated-threw/call-never/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->generates()->throws(new RuntimeException('AARDVARK'));
$stub->with('bonobo')->generates()->throws(new RuntimeException('BONOBO'));
try {
iterator_to_array($stub('aardv... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated-threw/generator-events/verification.php | test/fixture/verification/generated-threw/generator-events/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()
->setLabel('label')
->does(
function ($values) {
foreach ($values as $key => $value) {
try {
yield $key => $value;
} catch (RuntimeException $e) {
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated-threw/type-mismatch/verification.php | test/fixture/verification/generated-threw/type-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->generates()->throws(new RuntimeException('AARDVARK'));
$stub->with('bonobo')->generates()->throws(new RuntimeException('BONOBO'));
$stub->with('chameleon')->generates()->r... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated-threw/call-value-mismatch/verification.php | test/fixture/verification/generated-threw/call-value-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->generates()->throws(new RuntimeException('AARDVARK'));
$stub->with('bonobo')->generates()->throws(new RuntimeException('BONOBO'));
try {
iterator_to_array($stub('aardv... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated-threw/unconsumed/verification.php | test/fixture/verification/generated-threw/unconsumed/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns('AARDVARK');
$stub->with('bonobo')->throws(new RuntimeException('BONOBO'));
$stub->with('chameleon')->returns(['CHAMELEON']);
$stub->with('dugong')->returns(['DUGO... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated-threw/no-responses/verification.php | test/fixture/verification/generated-threw/no-responses/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setUseIterableSpies(true)->setLabel('label');
$stub->with('aardvark')->generates();
$stub->with('bonobo', '*')->does(
function ($animal, $verify, $depth = 0) use (&$stub) {
if ($depth < 1) {
iterator_to_array($stub($an... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated-threw/between/verification.php | test/fixture/verification/generated-threw/between/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->generates()->throws(new RuntimeException('AARDVARK'));
$stub->with('bonobo')->generates()->throws(new RuntimeException('BONOBO'));
try {
iterator_to_array($stub('aardv... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated-threw/never/verification.php | test/fixture/verification/generated-threw/never/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->generates()->returns('AARDVARK');
$stub->with('bonobo')->generates()->returns('BONOBO');
$stub->with('chameleon')->generates()->throws(new RuntimeException('BONOBO'));
$st... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received-exception/times/verification.php | test/fixture/verification/received-exception/times/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO', 'BADGER']);
$stub->with('chameleon')->generates(['CHAMELEON']);
iterator_to_array($stub('aardvark'));
$g... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received-exception/call-times/verification.php | test/fixture/verification/received-exception/call-times/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO', 'BADGER']);
iterator_to_array($stub('aardvark'));
$generator = $stub('bonobo');
try {
$generator->th... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received-exception/always/verification.php | test/fixture/verification/received-exception/always/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO', 'BADGER']);
$stub->with('chameleon')->generates(['CHAMELEON']);
iterator_to_array($stub('aardvark'));
$g... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received-exception/value-mismatch/verification.php | test/fixture/verification/received-exception/value-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO']);
$stub->with('chameleon')->returns('CHAMELEON');
$stub->with('dugong')->throws(new RuntimeException('DU... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received-exception/call-type-mismatch/verification.php | test/fixture/verification/received-exception/call-type-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO']);
iterator_to_array($stub('aardvark'));
$generator = $stub('bonobo');
try {
$generator->throw(new Ru... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received-exception/call-non-receiving/verification.php | test/fixture/verification/received-exception/call-non-receiving/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO']);
iterator_to_array($stub('aardvark'));
$generator = $stub('bonobo');
$generator->send('MECHA-BONOBO');
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received-exception/generator-events/verification.php | test/fixture/verification/received-exception/generator-events/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()
->setLabel('label')
->does(
function ($values) {
foreach ($values as $key => $value) {
try {
yield $key => $value;
} catch (RuntimeException $e) {
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received-exception/type-mismatch/verification.php | test/fixture/verification/received-exception/type-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO']);
$stub->with('chameleon')->returns('CHAMELEON');
$stub->with('dugong')->throws(new RuntimeException('DU... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received-exception/call-value-mismatch/verification.php | test/fixture/verification/received-exception/call-value-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO']);
iterator_to_array($stub('aardvark'));
$generator = $stub('bonobo');
try {
$generator->throw(new Ru... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received-exception/call-never-value-match/verification.php | test/fixture/verification/received-exception/call-never-value-match/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO', 'BADGER']);
iterator_to_array($stub('aardvark'));
$generator = $stub('bonobo');
try {
$generator->th... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received-exception/non-receiving/verification.php | test/fixture/verification/received-exception/non-receiving/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO']);
$stub->with('chameleon')->returns('CHAMELEON');
$stub->with('dugong')->throws(new RuntimeException('DU... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received-exception/call-never-type-match/verification.php | test/fixture/verification/received-exception/call-never-type-match/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO', 'BADGER']);
iterator_to_array($stub('aardvark'));
$generator = $stub('bonobo');
try {
$generator->th... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received-exception/call-never-any/verification.php | test/fixture/verification/received-exception/call-never-any/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO', 'BADGER']);
iterator_to_array($stub('aardvark'));
$generator = $stub('bonobo');
try {
$generator->th... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received-exception/no-responses/verification.php | test/fixture/verification/received-exception/no-responses/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setUseIterableSpies(true)->setLabel('label');
$stub->with('aardvark')->generates();
$stub->with('bonobo', '*')->does(
function ($animal, $verify, $depth = 0) use (&$stub) {
if ($depth < 1) {
iterator_to_array($stub($an... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received-exception/between/verification.php | test/fixture/verification/received-exception/between/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO', 'BADGER']);
$stub->with('chameleon')->generates(['CHAMELEON']);
iterator_to_array($stub('aardvark'));
$g... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received-exception/never/verification.php | test/fixture/verification/received-exception/never/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO', 'BADGER']);
$stub->with('chameleon')->generates(['CHAMELEON']);
$stub->with('dugong')->returns(['DUGONG'... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated/times/verification.php | test/fixture/verification/generated/times/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub(
function ($animal) {
yield strtoupper($animal);
}
)->setLabel('label')->forwards();
$stub('aardvark');
$stub('bonobo');
// verification
$stub->times(3)->generated();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated/no-calls/verification.php | test/fixture/verification/generated/no-calls/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label');
// verification
$stub->generated();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated/always/verification.php | test/fixture/verification/generated/always/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label');
$stub->with('aardvark')->returns('AARDVARK');
$stub->with('bonobo')->generates()->yields('BONOBO');
$stub('aardvark');
$stub('bonobo');
// verification
$stub->always()->generated();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated/no-generator/verification.php | test/fixture/verification/generated/no-generator/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label');
$stub->with('aardvark')->returns('AARDVARK');
$stub->with('bonobo')->throws(new RuntimeException('BONOBO'));
$stub('aardvark');
try {
$stub('bonobo');
} catch (RuntimeException $e) {
}
// verification
$stub->generated(... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated/call-no-generator/verification.php | test/fixture/verification/generated/call-no-generator/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label');
$stub->with('aardvark')->returns('AARDVARK');
$stub->with('bonobo')->throws(new RuntimeException('BONOBO'));
$stub('aardvark');
try {
$stub('bonobo');
} catch (RuntimeException $e) {
}
// verification
$stub->lastCall()... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated/call-never/verification.php | test/fixture/verification/generated/call-never/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub(
function ($animal) {
yield strtoupper($animal);
}
)->setLabel('label')->forwards();
$stub('aardvark');
$stub('bonobo');
// verification
$stub->lastCall()->never()->generated();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated/no-responses/verification.php | test/fixture/verification/generated/no-responses/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = null;
$stub = Phony::stub(
function ($verify, $depth = 0) use (&$stub) {
if ($depth < 1) {
$stub($verify, $depth + 1);
} else {
$verify();
}
}
)->setLabel('label')->forwards();
// verification
$stub(
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated/between/verification.php | test/fixture/verification/generated/between/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub(
function ($animal) {
yield strtoupper($animal);
}
)->setLabel('label')->forwards();
$stub('aardvark');
$stub('bonobo');
// verification
$stub->between(3, 4)->generated();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated/never/verification.php | test/fixture/verification/generated/never/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub(
function ($animal) {
yield strtoupper($animal);
}
)->setLabel('label')->forwards();
$stub('aardvark');
$stub('bonobo');
// verification
$stub->never()->generated();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/completed/call-none-completed/verification.php | test/fixture/verification/completed/call-none-completed/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()
->setLabel('label')
->setUseIterableSpies(true)
->returnsArgument();
$stub(['aardvark', 'bonobo', 'chameleon']);
foreach ($stub(['aardvark', 'bonobo', 'chameleon']) as $value) {
if ('bonobo' === $value) {
break;
}
}... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/completed/times/verification.php | test/fixture/verification/completed/times/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()
->setLabel('label')
->setUseIterableSpies(true)
->returns(['aardvark', 'bonobo', 'chameleon']);
iterator_to_array($stub());
iterator_to_array($stub());
// verification
$stub->times(3)->completed();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/completed/no-calls/verification.php | test/fixture/verification/completed/no-calls/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label');
// verification
$stub->completed();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/completed/always/verification.php | test/fixture/verification/completed/always/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()
->setLabel('label')
->setUseIterableSpies(true)
->returns(['aardvark', 'bonobo', 'chameleon']);
iterator_to_array($stub());
foreach ($stub() as $value) {
if ('bonobo' === $value) {
break;
}
}
$stub();
iterator_to_ar... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/completed/none-completed/verification.php | test/fixture/verification/completed/none-completed/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()
->setLabel('label')
->setUseIterableSpies(true)
->returnsArgument();
$stub(['aardvark', 'bonobo', 'chameleon']);
foreach ($stub(['aardvark', 'bonobo', 'chameleon']) as $value) {
if ('bonobo' === $value) {
break;
}
}... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/completed/call-never/verification.php | test/fixture/verification/completed/call-never/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()
->setLabel('label')
->setUseIterableSpies(true)
->returns(['aardvark', 'bonobo', 'chameleon']);
foreach ($stub() as $value) {
if ('bonobo' === $value) {
break;
}
}
iterator_to_array($stub());
// verification
$stub-... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/completed/generator-events/verification.php | test/fixture/verification/completed/generator-events/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()
->setLabel('label')
->does(
function ($values) {
foreach ($values as $key => $value) {
try {
yield $key => $value;
} catch (RuntimeException $e) {
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/completed/no-responses/verification.php | test/fixture/verification/completed/no-responses/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = null;
$stub = Phony::stub(
function ($verify, $depth = 0) use (&$stub) {
if ($depth < 1) {
$stub($verify, $depth + 1);
} else {
$verify();
}
}
)->setLabel('label')->forwards();
// verification
$stub(
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/completed/between/verification.php | test/fixture/verification/completed/between/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()
->setLabel('label')
->setUseIterableSpies(true)
->returns(['aardvark', 'bonobo', 'chameleon']);
iterator_to_array($stub());
iterator_to_array($stub());
// verification
$stub->between(3, 4)->completed();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/completed/never/verification.php | test/fixture/verification/completed/never/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()
->setLabel('label')
->setUseIterableSpies(true)
->returns('aardvark', ['aardvark', 'bonobo', 'chameleon'])
->with('earwig')->throws(new RuntimeException('EARWIG'));
$stub();
try {
$stub('earwig');
} catch (RuntimeException ... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/iterated-key-value-mismatch/verification.php | test/fixture/verification/produced/iterated-key-value-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK' => 'MECHA-AARDVARK']);
$stub->with('bonobo')->returns(['BONOBO' => 'MECHA-BONOBO']);
iterator_to_array($stub('aardvark'));
iterator_to_array($stub('bon... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/times/verification.php | test/fixture/verification/produced/times/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK', 'MECHA-AARDVARK']);
$stub->with('bonobo')->returns(['BONOBO', 'MECHA-BONOBO']);
iterator_to_array($stub('aardvark'));
iterator_to_array($stub('bonobo'... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/call-times/verification.php | test/fixture/verification/produced/call-times/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->returns(['BONOBO', 'BADGER']);
$stub('aardvark');
iterator_to_array($stub('bonobo'));
// verification
$stub->lastCall()->ite... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/always/verification.php | test/fixture/verification/produced/always/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK', 'ANTEATER']);
$stub->with('bonobo')->returns(['BONOBO']);
iterator_to_array($stub('aardvark'));
$stub('bonobo');
// verification
$stub->iterated()->a... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/generated-non-producing/verification.php | test/fixture/verification/produced/generated-non-producing/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO']);
$stub('aardvark');
$stub('bonobo');
// verification
$stub->generated()->produced();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/iterated-key-mismatch/verification.php | test/fixture/verification/produced/iterated-key-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK' => 'MECHA-AARDVARK']);
$stub->with('bonobo')->returns(['BONOBO' => 'MECHA-BONOBO']);
iterator_to_array($stub('aardvark'));
iterator_to_array($stub('bon... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/generated-key-value-mismatch/verification.php | test/fixture/verification/produced/generated-key-value-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK' => 'MECHA-AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO' => 'MECHA-BONOBO']);
iterator_to_array($stub('aardvark'));
iterator_to_array($stub('b... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/call-iterated-value-mismatch/verification.php | test/fixture/verification/produced/call-iterated-value-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->returns(['BONOBO']);
iterator_to_array($stub('aardvark'));
iterator_to_array($stub('bonobo'));
// verification
$stub->lastCa... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/call-iterated-key-value-mismatch/verification.php | test/fixture/verification/produced/call-iterated-key-value-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK' => 'MECHA-AARDVARK']);
$stub->with('bonobo')->returns(['BONOBO' => 'MECHA-BONOBO']);
iterator_to_array($stub('aardvark'));
iterator_to_array($stub('bon... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/generated-value-mismatch/verification.php | test/fixture/verification/produced/generated-value-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO']);
iterator_to_array($stub('aardvark'));
iterator_to_array($stub('bonobo'));
// verification
$stub->gene... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/call-generated-key-mismatch/verification.php | test/fixture/verification/produced/call-generated-key-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->generates(['AARDVARK' => 'MECHA-AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO' => 'MECHA-BONOBO']);
iterator_to_array($stub('aardvark'));
iterator_to_array($stub(... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/call-iterated-non-producing/verification.php | test/fixture/verification/produced/call-iterated-non-producing/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->returns(['BONOBO']);
$stub('aardvark');
$stub('bonobo');
// verification
$stub->lastCall()->iterated()->produced();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/generated-key-mismatch/verification.php | test/fixture/verification/produced/generated-key-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK' => 'MECHA-AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO' => 'MECHA-BONOBO']);
iterator_to_array($stub('aardvark'));
iterator_to_array($stub('b... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/call-generated-key-value-mismatch/verification.php | test/fixture/verification/produced/call-generated-key-value-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->generates(['AARDVARK' => 'MECHA-AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO' => 'MECHA-BONOBO']);
iterator_to_array($stub('aardvark'));
iterator_to_array($stub(... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/iterated-non-producing/verification.php | test/fixture/verification/produced/iterated-non-producing/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns('AARDVARK');
$stub->with('bonobo')->throws(new RuntimeException('BONOBO'));
$stub->with('chameleon')->returns(['CHAMELEON']);
$stub->with('dugong')->generates(['DU... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/call-generated-non-producing/verification.php | test/fixture/verification/produced/call-generated-non-producing/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns('AARDVARK');
$stub->with('bonobo')->throws(new RuntimeException('BONOBO'));
$stub->with('chameleon')->returns(['CHAMELEON']);
$stub->with('dugong')->generates(['DU... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/call-never/verification.php | test/fixture/verification/produced/call-never/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->returns(['BONOBO']);
$stub('aardvark');
iterator_to_array($stub('bonobo'));
// verification
$stub->lastCall()->iterated()->n... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/call-generated-value-mismatch/verification.php | test/fixture/verification/produced/call-generated-value-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->generates(['AARDVARK']);
$stub->with('bonobo')->generates(['BONOBO']);
iterator_to_array($stub('aardvark'));
iterator_to_array($stub('bonobo'));
// verification
$stub->la... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/iterated-value-mismatch/verification.php | test/fixture/verification/produced/iterated-value-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK']);
$stub->with('bonobo')->returns(['BONOBO']);
iterator_to_array($stub('aardvark'));
iterator_to_array($stub('bonobo'));
// verification
$stub->iterat... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/generator-events/verification.php | test/fixture/verification/produced/generator-events/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()
->setLabel('label')
->does(
function ($values) {
foreach ($values as $key => $value) {
try {
yield $key => $value;
} catch (RuntimeException $e) {
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/no-responses/verification.php | test/fixture/verification/produced/no-responses/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = null;
$stub = Phony::stub(
function ($verify, $depth = 0) use (&$stub) {
if ($depth < 1) {
$stub($verify, $depth + 1);
} else {
$verify();
}
return [];
}
)->setUseIterableSpies(true)->setLabel... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/call-iterated-key-mismatch/verification.php | test/fixture/verification/produced/call-iterated-key-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK' => 'MECHA-AARDVARK']);
$stub->with('bonobo')->returns(['BONOBO' => 'MECHA-BONOBO']);
iterator_to_array($stub('aardvark'));
iterator_to_array($stub('bon... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/between/verification.php | test/fixture/verification/produced/between/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK', 'MECHA-AARDVARK']);
$stub->with('bonobo')->returns(['BONOBO', 'MECHA-BONOBO']);
iterator_to_array($stub('aardvark'));
iterator_to_array($stub('bonobo'... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/produced/never/verification.php | test/fixture/verification/produced/never/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->returns(['AARDVARK', 'ANTEATER']);
$stub->with('bonobo')->returns(['BONOBO']);
iterator_to_array($stub('aardvark'));
$stub('bonobo');
// verification
$stub->iterated()->n... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/returned/times/verification.php | test/fixture/verification/returned/times/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub(
function ($animal) {
return strtoupper($animal);
}
)->setLabel('label')->forwards();
$stub('aardvark');
$stub('bonobo');
// verification
$stub->times(3)->returned();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/returned/no-calls/verification.php | test/fixture/verification/returned/no-calls/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label');
// verification
$stub->returned();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/returned/always/verification.php | test/fixture/verification/returned/always/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub(
function ($animal) {
return strtoupper($animal);
}
)->setLabel('label')->forwards();
$stub('aardvark');
$stub('bonobo');
// verification
$stub->always()->returned('BONOBO');
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/returned/value-mismatch/verification.php | test/fixture/verification/returned/value-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub(
function ($animal) {
return strtoupper($animal);
}
)->setLabel('label')->forwards();
$stub('aardvark');
$stub('bonobo');
// verification
$stub->returned('CHAMELEON');
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/returned/call-never/verification.php | test/fixture/verification/returned/call-never/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub(
function ($animal) {
return strtoupper($animal);
}
)->setLabel('label')->forwards();
$stub('aardvark');
$stub('bonobo');
// verification
$stub->lastCall()->never()->returned('BONOBO');
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/returned/call-value-mismatch/verification.php | test/fixture/verification/returned/call-value-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub(
function ($animal) {
return strtoupper($animal);
}
)->setLabel('label')->forwards();
$stub('aardvark');
$stub('bonobo');
// verification
$stub->lastCall()->returned('CHAMELEON');
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/returned/no-return-value/verification.php | test/fixture/verification/returned/no-return-value/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub(
function ($animal) {
throw new RuntimeException(strtoupper($animal));
}
)->setLabel('label')->forwards();
try {
$stub('aardvark');
} catch (RuntimeException $e) {
}
try {
$stub('bonobo');
} catch (RuntimeException $e) {
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/returned/no-responses/verification.php | test/fixture/verification/returned/no-responses/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = null;
$stub = Phony::stub(
function ($verify, $depth = 0) use (&$stub) {
if ($depth < 1) {
$stub($verify, $depth + 1);
} else {
$verify();
}
}
)->setLabel('label')->forwards();
// verification
$stub(
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/returned/between/verification.php | test/fixture/verification/returned/between/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub(
function ($animal) {
return strtoupper($animal);
}
)->setLabel('label')->forwards();
$stub('aardvark');
$stub('bonobo');
// verification
$stub->between(3, 4)->returned();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/returned/call-no-return-value/verification.php | test/fixture/verification/returned/call-no-return-value/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub(
function ($animal) {
throw new RuntimeException(strtoupper($animal));
}
)->setLabel('label')->forwards();
try {
$stub('aardvark');
} catch (RuntimeException $e) {
}
try {
$stub('bonobo');
} catch (RuntimeException $e) {
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/returned/never/verification.php | test/fixture/verification/returned/never/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub(
function ($animal) {
return strtoupper($animal);
}
)->setLabel('label')->forwards();
$stub('aardvark');
$stub('bonobo');
// verification
$stub->never()->returned('BONOBO');
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/in-order/no-events/verification.php | test/fixture/verification/in-order/no-events/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// verification
Phony::inOrder();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/in-order/generator-events/verification.php | test/fixture/verification/in-order/generator-events/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$first = Phony::spy()->setLabel('first');
$first();
$stub = Phony::stub()->setLabel('label')->does(
function () {
yield 'a';
try {
yield 'b';
} catch (Exception $e) {
}
}
);
$generator = $stub();
$generator->sen... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/in-order/normal-events/verification.php | test/fixture/verification/in-order/normal-events/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$first = Phony::spy()->setLabel('first');
$first();
$stub = Phony::stub()
->setLabel('label')
->setUseIterableSpies(true)
->returnsArgument();
$stub->with('c', 'd')->throws('C');
$stub('a', 'b');
try {
$stub('c', 'd');
} catch (Exception $e) {
}
it... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/in-order/normal-events/supported.php | test/fixture/verification/in-order/normal-events/supported.php | <?php
$message = 'Requires PHP >= 8.2';
return version_compare(PHP_VERSION, '8.2.x', '>=');
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/in-order/unexpected-order/verification.php | test/fixture/verification/in-order/unexpected-order/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spyA = Phony::spy()->setLabel('a');
$spyB = Phony::spy()->setLabel('b');
$spyA(1);
$spyA(2);
$spyB(1);
$spyA(3);
$spyB(2);
$spyB(3);
// verification
Phony::inOrder(
$spyA->calledWith(1),
$spyA->calledWith(2),
$spyA->calledWith(3),
$spyB->calle... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/hook-generator/arguments/expected.php | test/fixture/hook-generator/arguments/expected.php | <?php
namespace Foo\Bar;
function functionName(
$first,
&$second,
\Eloquent\Phony\Test\TestClassA $third,
$fourth = null,
$fifth = 111,
$sixth = array (
),
$seventh = array (
0 => 'valueA',
1 => 'valueB',
),
$eighth = array (
'keyA' => 'valueA',
'keyB' => 'valueB',
),
?\Elo... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/hook-generator/arguments/callback.php | test/fixture/hook-generator/arguments/callback.php | <?php
$functionName = 'functionName';
$namespace = 'Foo\Bar';
$callback = function (
$first,
&$second,
Eloquent\Phony\Test\TestClassA $third,
$fourth = null,
$fifth = 111,
$sixth = [],
$seventh = ['valueA', 'valueB'],
$eighth = ['keyA' => 'valueA', 'keyB' => 'valueB'],
Eloquent\Phon... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/hook-generator/variadics-type/expected.php | test/fixture/hook-generator/variadics-type/expected.php | <?php
namespace Foo\Bar;
function functionName(
$a,
$b,
\stdClass ...$c
) {
$¤argumentCount = \func_num_args();
$¤arguments = [];
if ($¤argumentCount > 0) {
$¤arguments[] = $a;
}
if ($¤argumentCount > 1) {
$¤arguments[] = $b;
}
for ($¤i = 2; $¤i < $¤argumentCo... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/hook-generator/variadics-type/callback.php | test/fixture/hook-generator/variadics-type/callback.php | <?php
$functionName = 'functionName';
$namespace = 'Foo\Bar';
$callback = function ($a, $b, stdClass ...$c) {};
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/hook-generator/variadics/expected.php | test/fixture/hook-generator/variadics/expected.php | <?php
namespace Foo\Bar;
function functionName(
$a,
$b,
...$c
) {
$¤argumentCount = \func_num_args();
$¤arguments = [];
if ($¤argumentCount > 0) {
$¤arguments[] = $a;
}
if ($¤argumentCount > 1) {
$¤arguments[] = $b;
}
for ($¤i = 2; $¤i < $¤argumentCount; ++$¤i... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/hook-generator/variadics/callback.php | test/fixture/hook-generator/variadics/callback.php | <?php
$functionName = 'functionName';
$namespace = 'Foo\Bar';
$callback = function ($a, $b, ...$c) {};
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/hook-generator/variadics-reference/expected.php | test/fixture/hook-generator/variadics-reference/expected.php | <?php
namespace Foo\Bar;
function functionName(
$a,
$b,
&...$c
) {
$¤argumentCount = \func_num_args();
$¤arguments = [];
if ($¤argumentCount > 0) {
$¤arguments[] = $a;
}
if ($¤argumentCount > 1) {
$¤arguments[] = $b;
}
for ($¤i = 2; $¤i < $¤argumentCount; ++$¤... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/hook-generator/variadics-reference/callback.php | test/fixture/hook-generator/variadics-reference/callback.php | <?php
$functionName = 'functionName';
$namespace = 'Foo\Bar';
$callback = function ($a, $b, &...$c) {};
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/hook-generator/no-arguments/expected.php | test/fixture/hook-generator/no-arguments/expected.php | <?php
namespace Foo\Bar;
function functionName()
{
$¤argumentCount = \func_num_args();
$¤arguments = [];
for ($¤i = 0; $¤i < $¤argumentCount; ++$¤i) {
$¤arguments[] = \func_get_arg($¤i);
}
$¤name = 'foo\\bar\\functionname';
if (
!isset(
\Eloquent\Phony\Hook\Funct... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/hook-generator/no-arguments/callback.php | test/fixture/hook-generator/no-arguments/callback.php | <?php
$functionName = 'functionName';
$namespace = 'Foo\Bar';
$callback = function () {};
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/hook-generator/variadics-nullable-type/expected.php | test/fixture/hook-generator/variadics-nullable-type/expected.php | <?php
namespace Foo\Bar;
function functionName(
$a,
$b,
?\stdClass ...$c
) {
$¤argumentCount = \func_num_args();
$¤arguments = [];
if ($¤argumentCount > 0) {
$¤arguments[] = $a;
}
if ($¤argumentCount > 1) {
$¤arguments[] = $b;
}
for ($¤i = 2; $¤i < $¤argumentC... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/hook-generator/variadics-nullable-type/callback.php | test/fixture/hook-generator/variadics-nullable-type/callback.php | <?php
$functionName = 'functionName';
$namespace = 'Foo\Bar';
$callback = function ($a, $b, ?stdClass ...$c) {};
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/mock-generator/empty/expected.php | test/fixture/mock-generator/empty/expected.php | <?php
use Eloquent\Phony\Call\Arguments;
use Eloquent\Phony\Mock\Handle\InstanceHandle;
use Eloquent\Phony\Mock\Handle\StaticHandleRegistry;
use Eloquent\Phony\Mock\Mock;
class MockGeneratorEmpty
implements Mock
{
private readonly InstanceHandle $_handle;
}
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/mock-generator/empty/builder.php | test/fixture/mock-generator/empty/builder.php | <?php
$builder = $factory->create();
return $builder->named('MockGeneratorEmpty');
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/mock-generator/self-keyword/expected.php | test/fixture/mock-generator/self-keyword/expected.php | <?php
use Eloquent\Phony\Call\Arguments;
use Eloquent\Phony\Mock\Handle\InstanceHandle;
use Eloquent\Phony\Mock\Handle\StaticHandleRegistry;
use Eloquent\Phony\Mock\Mock;
class MockGeneratorSelfKeyword
extends \Eloquent\Phony\Test\TestClassC
implements Mock
{
public function methodA(
\Eloquent\Phony\Test\... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/mock-generator/self-keyword/builder.php | test/fixture/mock-generator/self-keyword/builder.php | <?php
use Eloquent\Phony\Test\TestClassC;
$builder = $factory->create(TestClassC::class);
return $builder->named('MockGeneratorSelfKeyword');
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/mock-generator/readonly-properties-ad-hoc/expected.php | test/fixture/mock-generator/readonly-properties-ad-hoc/expected.php | <?php
use Eloquent\Phony\Call\Arguments;
use Eloquent\Phony\Mock\Handle\InstanceHandle;
use Eloquent\Phony\Mock\Handle\StaticHandleRegistry;
use Eloquent\Phony\Mock\Mock;
class MockGeneratorReadonlyPropertiesAdHoc
implements Mock
{
public readonly string $propertyA;
public readonly ?int $propertyB;
privat... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.