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/consumed/call-generated-unconsumed/verification.php | test/fixture/verification/consumed/call-generated-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')->generates(['BONOBO']);
$stub('aardvark');
$stub('bonobo');
// verification
$stub->lastCall()->generated()->consumed();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/consumed/generator-never/verification.php | test/fixture/verification/consumed/generator-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')->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/consumed/call-iterated-unconsumed/verification.php | test/fixture/verification/consumed/call-iterated-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')->returns(['BONOBO']);
$stub('aardvark');
$stub('bonobo');
// verification
$stub->lastCall()->iterated()->consumed();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/consumed/call-never/verification.php | test/fixture/verification/consumed/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/consumed/generator-events/verification.php | test/fixture/verification/consumed/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/consumed/iterated-unconsumed/verification.php | test/fixture/verification/consumed/iterated-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')->generates(['DU... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/consumed/generator-unconsumed/verification.php | test/fixture/verification/consumed/generator-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/consumed/no-responses/verification.php | test/fixture/verification/consumed/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/consumed/between/verification.php | test/fixture/verification/consumed/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')->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/consumed/never/verification.php | test/fixture/verification/consumed/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']);
iterator_to_array($stub('aardvark'));
$stub('bonobo');
// verification
$stub->iterated()->never()->cons... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/threw/times/verification.php | test/fixture/verification/threw/times/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/threw/no-calls/verification.php | test/fixture/verification/threw/no-calls/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label');
// verification
$stub->threw();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/threw/no-exception/verification.php | test/fixture/verification/threw/no-exception/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->threw();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/threw/always/verification.php | test/fixture/verification/threw/always/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/threw/value-mismatch/verification.php | test/fixture/verification/threw/value-mismatch/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/threw/call-never/verification.php | test/fixture/verification/threw/call-never/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/threw/call-no-exception/verification.php | test/fixture/verification/threw/call-no-exception/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()->threw();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/threw/type-mismatch/verification.php | test/fixture/verification/threw/type-mismatch/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/threw/call-value-mismatch/verification.php | test/fixture/verification/threw/call-value-mismatch/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/threw/no-responses/verification.php | test/fixture/verification/threw/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/threw/between/verification.php | test/fixture/verification/threw/between/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/threw/never/verification.php | test/fixture/verification/threw/never/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/called-with/times/verification.php | test/fixture/verification/called-with/times/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
$spy('aardvark', ['bonobo', 'capybara', 'dugong']);
$spy('armadillo', ['bonobo', 'chameleon', 'dormouse']);
$spy('aardvark', ['bonobo', 'capybara', 'dugong']);
// verification
$spy->times(3)->calledWith('aardvark', ['bonobo'... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/called-with/no-calls/verification.php | test/fixture/verification/called-with/no-calls/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
// verification
$spy->calledWith('aardvark', ['bonobo', 'chameleon', 'dugong']);
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/called-with/missing-arguments-wildcard/verification.php | test/fixture/verification/called-with/missing-arguments-wildcard/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
$spy('aardvark');
$spy('aardvark', 'bonobo');
$spy('aardvark', 'bonobo', 'chameleon');
$spy('aardvark', 'bonobo', 'chameleon', 'dugong');
// verification
$spy->calledWith(
'aardvark',
'bonobo',
'chameleon',
P... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/called-with/mock-label/verification.php | test/fixture/verification/called-with/mock-label/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$handle = Phony::mock('ClassA')->setLabel('label');
$mock = $handle->get();
$mock->methodA('armadillo', ['bonobo', 'capybara', 'dugong']);
// verification
$handle->methodA->calledWith('aardvark', ['bonobo', 'chameleon', 'dugong']);
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/called-with/always/verification.php | test/fixture/verification/called-with/always/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
$spy('aardvark', ['bonobo', 'capybara', 'dugong']);
$spy('armadillo', ['bonobo', 'chameleon', 'dormouse']);
// verification
$spy->always()->calledWith('aardvark', ['bonobo', 'chameleon', 'dormouse']);
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/called-with/call-argument-mismatch/verification.php | test/fixture/verification/called-with/call-argument-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
$spy('aardvark', ['bonobo', 'capybara', 'dugong']);
$spy('armadillo', ['bonobo', 'chameleon', 'dormouse']);
// verification
$spy->lastCall()->calledWith('aardvark', ['bonobo', 'chameleon', 'dugong']);
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/called-with/empty-matchers/verification.php | test/fixture/verification/called-with/empty-matchers/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
$spy('aardvark', ['bonobo', 'capybara', 'dugong']);
$spy('armadillo', ['bonobo', 'chameleon', 'dormouse']);
// verification
$spy->calledWith();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/called-with/argument-mismatch/verification.php | test/fixture/verification/called-with/argument-mismatch/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
$spy('aardvark', ['bonobo', 'capybara', 'dugong']);
$spy('armadillo', ['bonobo', 'chameleon', 'dormouse']);
// verification
$spy->calledWith('aardvark', ['bonobo', 'chameleon', 'dugong']);
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/called-with/missing-arguments/verification.php | test/fixture/verification/called-with/missing-arguments/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
$spy('aardvark');
$spy('aardvark', 'bonobo');
$spy('aardvark', 'bonobo', 'chameleon');
// verification
$spy->calledWith('aardvark', 'bonobo', 'chameleon', 'dugong');
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/called-with/spy-label/verification.php | test/fixture/verification/called-with/spy-label/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
$spy('armadillo', ['bonobo', 'capybara', 'dugong']);
// verification
$spy->calledWith('aardvark', ['bonobo', 'chameleon', 'dugong']);
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/called-with/call-never/verification.php | test/fixture/verification/called-with/call-never/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
$spy('aardvark', ['bonobo', 'capybara', 'dugong']);
$spy('aardvark', ['bonobo', 'chameleon', 'dugong']);
// verification
$spy->lastCall()->never()->calledWith('aardvark', ['bonobo', 'chameleon', 'dugong']);
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/called-with/no-arguments/verification.php | test/fixture/verification/called-with/no-arguments/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
$spy();
$spy('aardvark', ['bonobo', 'capybara', 'dugong']);
$spy();
$spy('armadillo', ['bonobo', 'chameleon', 'dormouse']);
$spy();
// verification
$spy->calledWith('aardvark', ['bonobo', 'chameleon', 'dugong']);
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/called-with/call-any-arguments/verification.php | test/fixture/verification/called-with/call-any-arguments/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
$spy('aardvark', ['bonobo', 'capybara', 'dugong']);
$spy('armadillo', ['bonobo', 'chameleon', 'dormouse']);
// verification
$spy->lastCall()->never()->calledWith('*');
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/called-with/between/verification.php | test/fixture/verification/called-with/between/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
$spy('aardvark', ['bonobo', 'capybara', 'dugong']);
$spy('armadillo', ['bonobo', 'chameleon', 'dormouse']);
$spy('aardvark', ['bonobo', 'capybara', 'dugong']);
// verification
$spy->between(3, 4)->calledWith('aardvark', ['bo... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/called-with/never/verification.php | test/fixture/verification/called-with/never/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
$spy('aardvark', ['bonobo', 'capybara', 'dugong']);
$spy('aardvark', ['bonobo', 'chameleon', 'dugong']);
// verification
$spy->never()->calledWith('aardvark', ['bonobo', 'chameleon', 'dugong']);
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/called-with/any-arguments/verification.php | test/fixture/verification/called-with/any-arguments/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
$spy('aardvark', ['bonobo', 'capybara', 'dugong']);
$spy('armadillo', ['bonobo', 'chameleon', 'dormouse']);
// verification
$spy->never()->calledWith('*');
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/called/times/verification.php | test/fixture/verification/called/times/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
$spy('aardvark', ['bonobo', 'capybara', 'dugong']);
$spy('armadillo', ['bonobo', 'chameleon', 'dormouse']);
// verification
$spy->times(3)->called();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/called/no-calls/verification.php | test/fixture/verification/called/no-calls/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
// verification
$spy->called();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/called/no-arguments/verification.php | test/fixture/verification/called/no-arguments/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
$spy();
$spy('aardvark', ['bonobo', 'capybara', 'dugong']);
$spy();
$spy('armadillo', ['bonobo', 'chameleon', 'dormouse']);
$spy();
// verification
$spy->never()->called();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/called/between/verification.php | test/fixture/verification/called/between/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
$spy('aardvark', ['bonobo', 'capybara', 'dugong']);
$spy('armadillo', ['bonobo', 'chameleon', 'dormouse']);
// verification
$spy->between(3, 4)->called();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/called/never/verification.php | test/fixture/verification/called/never/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
$spy('aardvark', ['bonobo', 'capybara', 'dugong']);
$spy('armadillo', ['bonobo', 'chameleon', 'dormouse']);
// verification
$spy->never()->called();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/iterated/times/verification.php | test/fixture/verification/iterated/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']);
$stub('aardvark');
$stub('bonobo');
// verification
$stub->times(3)->iterated();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/iterated/no-calls/verification.php | test/fixture/verification/iterated/no-calls/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label');
// verification
$stub->iterated();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/iterated/always/verification.php | test/fixture/verification/iterated/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')->returns(['BONOBO']);
$stub('aardvark');
$stub('bonobo');
// verification
$stub->always()->iterated();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/iterated/no-iterable/verification.php | test/fixture/verification/iterated/no-iterable/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->iterated()... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/iterated/call-never/verification.php | test/fixture/verification/iterated/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');
$stub('bonobo');
// verification
$stub->lastCall()->never()->iterated();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/iterated/call-no-iterable/verification.php | test/fixture/verification/iterated/call-no-iterable/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/iterated/no-responses/verification.php | test/fixture/verification/iterated/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/iterated/between/verification.php | test/fixture/verification/iterated/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')->returns(['BONOBO']);
$stub('aardvark');
$stub('bonobo');
// verification
$stub->between(3, 4)->iterated();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/iterated/never/verification.php | test/fixture/verification/iterated/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');
$stub('bonobo');
// verification
$stub->never()->iterated();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/no-interaction/static/verification.php | test/fixture/verification/no-interaction/static/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$handle = Phony::mock('ClassA')->setLabel('label');
$class = $handle->className();
$class::staticMethodA('b', 'c');
$class::staticMethodB('c', 'd');
// verification
Phony::onStatic($handle)->noInteraction();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/no-interaction/ad-hoc/verification.php | test/fixture/verification/no-interaction/ad-hoc/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$builder = Phony::mockBuilder()
->like(
[
'methodA' => function () {},
'methodB' => function () {},
]
)
->named('PhonyNoInteraction');
$mock = $builder->get();
$handle = Phony::on($mock)->setLabel('label');
$mock-... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/no-interaction/parent-class/verification.php | test/fixture/verification/no-interaction/parent-class/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$handle = Phony::mock('ClassA')->setLabel('label');
$mock = $handle->get();
$mock->methodA('b', 'c');
$mock->methodB('c', 'd');
// verification
$handle->noInteraction();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/used/times/verification.php | test/fixture/verification/used/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']);
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/used/always/verification.php | test/fixture/verification/used/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')->returns(['BONOBO']);
iterator_to_array($stub('aardvark'));
$stub('bonobo');
// verification
$stub->iterated()->always()->use... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/used/call-iterated-unused/verification.php | test/fixture/verification/used/call-iterated-unused/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()->used();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/used/generator-unused/verification.php | test/fixture/verification/used/generator-unused/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/used/call-never/verification.php | test/fixture/verification/used/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/used/generator-events/verification.php | test/fixture/verification/used/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/used/call-generated-unused/verification.php | test/fixture/verification/used/call-generated-unused/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->lastCall()->generated()->used();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/used/no-responses/verification.php | test/fixture/verification/used/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/used/between/verification.php | test/fixture/verification/used/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')->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/used/never/verification.php | test/fixture/verification/used/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']);
iterator_to_array($stub('aardvark'));
$stub('bonobo');
// verification
$stub->iterated()->never()->used... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/used/iterated-unused/verification.php | test/fixture/verification/used/iterated-unused/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/generated-returned/times/verification.php | test/fixture/verification/generated-returned/times/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->generates()->returns('AARDVARK');
iterator_to_array($stub('aardvark'));
iterator_to_array($stub('aardvark'));
// verification
$stub->generated()->times(3)->returned('AARD... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated-returned/always/verification.php | test/fixture/verification/generated-returned/always/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');
iterator_to_array($stub('aardvark'));
iterator_to_array($stub('bonobo'));
// veri... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated-returned/value-mismatch/verification.php | test/fixture/verification/generated-returned/value-mismatch/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('CHAMELEON'));
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated-returned/call-never/verification.php | test/fixture/verification/generated-returned/call-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');
iterator_to_array($stub('aardvark'));
iterator_to_array($stub('bonobo'));
// veri... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated-returned/generator-events/verification.php | test/fixture/verification/generated-returned/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-returned/call-value-mismatch/verification.php | test/fixture/verification/generated-returned/call-value-mismatch/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');
iterator_to_array($stub('aardvark'));
iterator_to_array($stub('bonobo'));
// veri... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated-returned/unconsumed/verification.php | test/fixture/verification/generated-returned/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-returned/no-responses/verification.php | test/fixture/verification/generated-returned/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-returned/between/verification.php | test/fixture/verification/generated-returned/between/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->generates()->returns('AARDVARK');
iterator_to_array($stub('aardvark'));
iterator_to_array($stub('aardvark'));
// verification
$stub->generated()->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/generated-returned/never/verification.php | test/fixture/verification/generated-returned/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/diff/confusing/verification.php | test/fixture/verification/diff/confusing/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$spy = Phony::spy()->setLabel('label');
$spy([[], ['+1', []], (object) ['+1' => 1]]);
$spy([['+1', []], (object) ['+1' => 1]]);
$spy([[1], (object) ['+1' => 1]]);
$spy([[1], ['+1'], (object) ['+1' => 1]]);
$spy([[1], [[]], (object) ['+1' => 1]]);
$spy([[1], ['+1', ... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received/times/verification.php | test/fixture/verification/received/times/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->generates(['AARDVARK', 'ANTEATER']);
$stub->with('bonobo')->generates(['BONOBO', 'BADGER']);
$generator = $stub('aardvark');
$generator->send('MECHA-AARDVARK');
$generator... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received/call-times/verification.php | test/fixture/verification/received/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');
$generator->send('MECHA-... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received/always/verification.php | test/fixture/verification/received/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/value-mismatch/verification.php | test/fixture/verification/received/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', 'BADGER']);
$stub->with('chameleon')->returns('CHAMELEON');
$stub->with('dugong')->throws(new RuntimeExc... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received/call-never/verification.php | test/fixture/verification/received/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')->generates(['BONOBO', 'BADGER']);
iterator_to_array($stub('aardvark'));
$generator = $stub('bonobo');
$generator->send('MECHA-... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received/call-non-receiving/verification.php | test/fixture/verification/received/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'));
$stub('bonobo');
// verification
$stub->lastCall()->generated()... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received/generator-events/verification.php | test/fixture/verification/received/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/call-value-mismatch/verification.php | test/fixture/verification/received/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', 'BADGER']);
iterator_to_array($stub('aardvark'));
$generator = $stub('bonobo');
$generator->send('MECHA-... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received/non-receiving/verification.php | test/fixture/verification/received/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'));
$stub('bonobo');
// verification
$stub->generated()->received()... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received/no-responses/verification.php | test/fixture/verification/received/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/between/verification.php | test/fixture/verification/received/between/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label')->setUseIterableSpies(true);
$stub->with('aardvark')->generates(['AARDVARK', 'ANTEATER']);
$stub->with('bonobo')->generates(['BONOBO', 'BADGER']);
$generator = $stub('aardvark');
$generator->send('MECHA-AARDVARK');
$generator... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/received/never/verification.php | test/fixture/verification/received/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(['CHAMELE... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/responded/times/verification.php | test/fixture/verification/responded/times/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = null;
$stub = Phony::stub(
function ($exception, $value) {
if ($exception) {
throw $exception;
}
return $value;
}
)->setLabel('label')->forwards();
$stub(null, 'aardvark');
try {
$stub(new RuntimeException('b... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/responded/no-calls/verification.php | test/fixture/verification/responded/no-calls/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub()->setLabel('label');
// verification
$stub->responded();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/responded/always/verification.php | test/fixture/verification/responded/always/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();
$stub(function () {});
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/responded/call-never/verification.php | test/fixture/verification/responded/call-never/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = Phony::stub(
function () {
return 'aardvark';
}
)->setLabel('label')->forwards();
$stub();
$stub();
// verification
$stub->lastCall()->never()->responded();
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/responded/call-no-responses/verification.php | test/fixture/verification/responded/call-no-responses/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = null;
$stub = Phony::stub(
function ($verify) use (&$stub) {
$verify();
}
)->setLabel('label')->forwards();
// verification
$stub(
function () use ($stub) {
$stub->lastCall()->responded();
}
);
| php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/responded/no-responses/verification.php | test/fixture/verification/responded/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/responded/between/verification.php | test/fixture/verification/responded/between/verification.php | <?php
use Eloquent\Phony\Test\Facade\Phony;
// setup
$stub = null;
$stub = Phony::stub(
function ($exception, $value) {
if ($exception) {
throw $exception;
}
return $value;
}
)->setLabel('label')->forwards();
$stub(null, 'aardvark');
try {
$stub(new RuntimeException('b... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/responded/never/verification.php | test/fixture/verification/responded/never/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 $depth;
}
)->setLabel('label')->forwards();
... | php | MIT | 3d093d78e83fa5066559854505f01b6ea19af12e | 2026-01-05T02:35:49.024953Z | false |
eloquent/phony | https://github.com/eloquent/phony/blob/3d093d78e83fa5066559854505f01b6ea19af12e/test/fixture/verification/generated-threw/times/verification.php | test/fixture/verification/generated-threw/times/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/always/verification.php | test/fixture/verification/generated-threw/always/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/value-mismatch/verification.php | test/fixture/verification/generated-threw/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'));
$stub->with('chameleon')->generates()->r... | 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.