Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wordpressfan committed Jul 1, 2024
1 parent b42cc6b commit 7a0da6f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,22 @@ protected function setUp(): void {
* @dataProvider configTestData
*/
public function testShouldReturnExpected( $config, $expected ) {
$mobile_cache = 'mobile' === $config['device'] ? 1 : 0;

$this->options->shouldReceive('get')
->with( 'cache_mobile', 1 )
->andReturn( 1 );
->andReturn( $mobile_cache );

$this->options->shouldReceive('get')
->with( 'do_caching_mobile_files', 1 )
->andReturn( 1 );
->andReturn( $mobile_cache );

$this->api_client->shouldReceive('add_to_atf_queue')
->with('http://example.com')
->once()
->andReturn([$config['url'], []]);

if('mobile' === $config['device']) {


$this->api_client->shouldReceive('add_to_atf_queue')
->with( 'http://example.com', $config['device'] )
->once()
Expand Down

0 comments on commit 7a0da6f

Please sign in to comment.