Skip to content

Commit 7457071

Browse files
Bring own assertions up-to-date
1 parent 2c52037 commit 7457071

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/Assert/HasDocumentConstraint.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class HasDocumentConstraint extends Constraint
1515

1616
public function __construct($filter)
1717
{
18-
parent::__construct();
1918
$this->filter = $filter;
2019
}
2120

src/Assert/IndexWasCreatedConstraint.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Helmich\MongoMock\Log\Index;
66
use Helmich\MongoMock\MockCollection;
7+
use PHPUnit\Framework\Assert;
78
use PHPUnit\Framework\Constraint\Constraint;
89

910
class IndexWasCreatedConstraint extends Constraint
@@ -20,7 +21,6 @@ class IndexWasCreatedConstraint extends Constraint
2021

2122
public function __construct($key, $options = [])
2223
{
23-
parent::__construct();
2424
$this->key = $key;
2525
$this->options = $options;
2626
}
@@ -31,7 +31,7 @@ protected function matches($other): bool
3131
return false;
3232
}
3333

34-
$constraint = \PHPUnit_Framework_Assert::equalTo(new Index($this->key, $this->options));
34+
$constraint = Assert::equalTo(new Index($this->key, $this->options));
3535

3636
foreach ($other->indices as $index) {
3737
if ($constraint->evaluate($index, '', true)) {

src/Assert/QueryWasExecutedConstraint.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Helmich\MongoMock\Log\Query;
66
use Helmich\MongoMock\MockCollection;
7+
use PHPUnit\Framework\Assert;
78
use PHPUnit\Framework\Constraint\Constraint;
89

910
class QueryWasExecutedConstraint extends Constraint
@@ -17,7 +18,6 @@ class QueryWasExecutedConstraint extends Constraint
1718

1819
public function __construct($filter, $options = [])
1920
{
20-
parent::__construct();
2121
$this->filter = $filter;
2222
$this->options = $options;
2323
}
@@ -28,7 +28,7 @@ protected function matches($other): bool
2828
return false;
2929
}
3030

31-
$constraint = \PHPUnit_Framework_Assert::equalTo(new Query($this->filter, $this->options));
31+
$constraint = Assert::equalTo(new Query($this->filter, $this->options));
3232

3333
foreach ($other->queries as $query) {
3434
if ($constraint->evaluate($query, '', true)) {

0 commit comments

Comments
 (0)