Last active
December 2, 2020 17:42
-
-
Save Mulkave/87d968816a86244828628cc1729f61bd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @dataProvider generousDataProvider::giveMeInput() | |
*/ | |
public fucntion test_thy_feature($input) | |
{ | |
// Mock Job that make an external HTTP request | |
$mOperation = Mockery::mock(GetTheBeansOperation::class, [$input])->makePartial(); | |
$mOperation->shouldReceive('run') | |
->with(BeanGrabberJob::class, [ | |
'platformId' => Arr::get($input, 'platform_id') | |
]) | |
->once() | |
->andReturn(true); | |
// Call the endpoint that runs the feature. | |
$this->post('/beans', [])->assertJson([ | |
'status' => 200, | |
'data' => [ | |
'yummy' => 'tummy' | |
] | |
]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment