Skip to content

Commit ee6e06d

Browse files
Revert "Added function usage to support functional interface."
This reverts commit aa56581.
1 parent aa56581 commit ee6e06d

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

tests/Functional/JsonValueMatchesFluentTest.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
namespace Helmich\JsonAssert\Tests\Functional;
33

44
use PHPUnit\Framework\TestCase;
5-
use function PHPUnit\Framework\assertThat;
6-
use function PHPUnit\Framework\equalTo;
7-
use function PHPUnit\Framework\greaterThanOrEqual;
8-
use function PHPUnit\Framework\logicalNot;
95

106
class JsonValueMatchesFluentTest extends TestCase
117
{
@@ -32,18 +28,18 @@ class JsonValueMatchesFluentTest extends TestCase
3228

3329
public function testAssertThatJsonDocumentContainsJsonValue()
3430
{
35-
assertThat(self::$exampleDocument, containsJsonValue('$.identifier', 1234));
31+
$this->assertThat(self::$exampleDocument, containsJsonValue('$.identifier', 1234));
3632
}
3733

3834
public function testAssertThatJsonDocumentMatchesJsonConstraints()
3935
{
40-
assertThat(
36+
$this->assertThat(
4137
self::$exampleDocument,
4238
matchesJsonConstraints(
4339
[
44-
'$.owner.name' => equalTo('Max Mustermann'),
45-
'$.products[*].identifier' => greaterThanOrEqual(500),
46-
'$.products[*].name' => logicalNot(equalTo('Weißbrot'))
40+
'$.owner.name' => $this->equalTo('Max Mustermann'),
41+
'$.products[*].identifier' => $this->greaterThanOrEqual(500),
42+
'$.products[*].name' => $this->logicalNot($this->equalTo('Weißbrot'))
4743
]
4844
)
4945
);

tests/Functional/JsonValueMatchesSchemaFluentTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
use Helmich\JsonAssert\JsonAssertions;
55
use PHPUnit\Framework\AssertionFailedError;
66
use PHPUnit\Framework\TestCase;
7-
use function PHPUnit\Framework\assertThat;
87

98
class JsonValueMatchesSchemaFluentTest extends TestCase
109
{
@@ -32,7 +31,7 @@ class JsonValueMatchesSchemaFluentTest extends TestCase
3231

3332
public function testJsonDocumentMatchesSchema()
3433
{
35-
assertThat(static::$exampleDocument, matchesJsonSchema([
34+
$this->assertThat(static::$exampleDocument, matchesJsonSchema([
3635
'type' => 'object',
3736
'required' => ['identifier', 'owner', 'products'],
3837
'properties' => [
@@ -65,7 +64,7 @@ public function testJsonDocumentDoesNotMatchSchema()
6564
{
6665
$this->expectException(AssertionFailedError::class);
6766

68-
assertThat(static::$exampleDocument, matchesJsonSchema([
67+
$this->assertThat(static::$exampleDocument, matchesJsonSchema([
6968
'type' => 'object',
7069
'required' => ['foobar'],
7170
'properties' => [

0 commit comments

Comments
 (0)