Skip to content

Commit

Permalink
Merge pull request #341 from Yoast/JRF/test-fix-assertion-param-order
Browse files Browse the repository at this point in the history
CS/QA: fix incorrect parameter order in test assertions
  • Loading branch information
jrfnl committed May 1, 2023
2 parents c40c19b + 536a4db commit dd5e221
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/php/unit/Configuration/configuration-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function testEmpty() {
$configuration->to_array()
);

$this->assertSame( Filters\applied( 'acf/get_info' ), 1 );
$this->assertSame( 1, Filters\applied( 'acf/get_info' ) );
}

/**
Expand Down Expand Up @@ -159,23 +159,23 @@ public function testLegacyBlackistNameFilter() {
->with( [] )
->andReturn( [] );

$this->assertSame( $configuration->get_blacklist_name(), $blacklist_name );
$this->assertSame( $blacklist_name, $configuration->get_blacklist_name() );


Filters\expectApplied( 'ysacf_exclude_fields' )
->once()
->with( [] )
->andReturn( [] );

$this->assertSame( $configuration->get_blacklist_name()->to_array(), [] );
$this->assertSame( [], $configuration->get_blacklist_name()->to_array() );


Filters\expectApplied( 'ysacf_exclude_fields' )
->once()
->with( [] )
->andReturn( [ 'some_field_name' ] );

$this->assertSame( $configuration->get_blacklist_name()->to_array(), [ 'some_field_name' ] );
$this->assertSame( [ 'some_field_name' ], $configuration->get_blacklist_name()->to_array() );
}

/**
Expand All @@ -198,14 +198,14 @@ public function testLegacyBlackistNameFilterInvalid() {
->with( [] )
->andReturn( 'invalid' );

$this->assertSame( $configuration->get_blacklist_name(), $blacklist_name );
$this->assertSame( $blacklist_name, $configuration->get_blacklist_name() );

Filters\expectApplied( 'ysacf_exclude_fields' )
->once()
->with( [] )
->andReturn( 'invalid' );

$this->assertSame( $configuration->get_blacklist_name()->to_array(), [] );
$this->assertSame( [], $configuration->get_blacklist_name()->to_array() );
}

/**
Expand Down

0 comments on commit dd5e221

Please sign in to comment.