Skip to content

Commit

Permalink
skip some tests for PHP 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Smetannikov committed Nov 24, 2019
1 parent e290b97 commit 9d28a51
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions tests/DataTest.php
Expand Up @@ -17,6 +17,7 @@

use JBZoo\Data\Data;
use JBZoo\Data\JSON;
use JBZoo\Utils\Sys;
use function JBZoo\Data\json;

/**
Expand Down Expand Up @@ -300,14 +301,18 @@ public function testNoNotice()
isSame(null, $data->get('qwerty'));
isSame(null, $data->get('qwerty.qwerty'));

// like object
isSame(null, $data->qwerty);
isSame(null, $data->qwerty['qwerty']);

// like array
isSame(null, $data['qwerty']);
isSame(null, $data['qwerty']['qwerty']);
isSame(null, $data['qwerty']['qwerty']['qwerty']['qwerty']);
if (Sys::isPHP('7.4')) {
skip('Needs to redesign method offsetGet() for PHP 7.4');
} else {
// like object
isSame(null, $data->qwerty);
isSame(null, $data->qwerty['qwerty']);

// like array
isSame(null, $data['qwerty']);
isSame(null, $data['qwerty']['qwerty']);
isSame(null, $data['qwerty']['qwerty']['qwerty']['qwerty']);
}
}

public function testIs()
Expand Down

0 comments on commit 9d28a51

Please sign in to comment.