Commit 36b54699 authored by srdjan's avatar srdjan Committed by Dimitris Mitsis

Updated PHPUnit test for 7.4

parent 09ea881d
Pipeline #146221 failed with stages
in 6 minutes and 22 seconds
......@@ -231,7 +231,14 @@ class PackageTest extends \OTGS_TestCase {
->method( 'get_package_strings' )
->willReturn( $wpml_package_object );
WP_Mock::onFilter( 'wpml_st_get_string_package' )->with( null )->reply( $wpml_package );
if ( version_compare( phpversion(), '7.2', '<' ) ) {
// There is some glitch in phpunit-5.7 used with php5.6-7.1,
// so we have to use this line to make test working.
WP_Mock::onFilter( 'wpml_st_get_string_package' )->with( null )->reply( $wpml_package );
} else {
// This is a proper line for testing.
WP_Mock::onFilter( 'wpml_st_get_string_package' )->with( null, $subject->getPackage() )->reply( $wpml_package );
}
if ( $expected_deleted ) {
foreach ( $expected_deleted as $string_name ) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment