+
+ $a = [
+ 'packageFiles' => [ [ 'name' => 'data.json', 'callback' => function () {
+ return [ 'aaa' ];
+ } ] ]
+ ];
+ $b = [
+ 'packageFiles' => [ [ 'name' => 'data.json', 'callback' => function () {
+ return [ 'bbb' ];
+ } ] ]
+ ];
+ yield 'packageFiles with different callback' => [ $a, $b, false ];
+
+ $a = [
+ 'packageFiles' => [ [ 'name' => 'aaa.json', 'callback' => function () {
+ return [ 'x' ];
+ } ] ]
+ ];
+ $b = [
+ 'packageFiles' => [ [ 'name' => 'bbb.json', 'callback' => function () {
+ return [ 'x' ];
+ } ] ]
+ ];
+ yield 'packageFiles with different file name and a callback' => [ $a, $b, false ];
+
+ $a = [
+ 'packageFiles' => [ [ 'name' => 'data.json', 'versionCallback' => function () {
+ return [ 'A-version' ];
+ }, 'callback' => function () {
+ throw new Exception( 'Unexpected computation' );
+ } ] ]
+ ];
+ $b = [
+ 'packageFiles' => [ [ 'name' => 'data.json', 'versionCallback' => function () {
+ return [ 'B-version' ];
+ }, 'callback' => function () {
+ throw new Exception( 'Unexpected computation' );
+ } ] ]
+ ];
+ yield 'packageFiles with different versionCallback' => [ $a, $b, false ];
+
+ $a = [
+ 'packageFiles' => [ [ 'name' => 'aaa.json',
+ 'versionCallback' => function () {
+ return [ 'X-version' ];
+ },
+ 'callback' => function () {
+ throw new Exception( 'Unexpected computation' );
+ }
+ ] ]
+ ];
+ $b = [
+ 'packageFiles' => [ [ 'name' => 'bbb.json',
+ 'versionCallback' => function () {
+ return [ 'X-version' ];
+ },
+ 'callback' => function () {
+ throw new Exception( 'Unexpected computation' );
+ }
+ ] ]
+ ];
+ yield 'packageFiles with different file name and a versionCallback' => [ $a, $b, false ];