Skip to content

Commit e60ef9f

Browse files
committed
fix tests on PHP 5.3
1 parent 3ac65e1 commit e60ef9f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Tests/Unit/Repository/StatementRepositoryTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,14 @@ public function testFindStatementsByCriteria()
7070
public function testSave()
7171
{
7272
$statement = StatementFixtures::getMinimalStatement();
73+
$self = $this;
7374
$this
7475
->mappedStatementRepository
7576
->expects($this->once())
7677
->method('storeMappedStatement')
7778
->with(
78-
$this->callback(function (MappedStatement $mappedStatement) use ($statement) {
79-
return $this->assertMappedStatement(
79+
$this->callback(function (MappedStatement $mappedStatement) use ($self, $statement) {
80+
return $self->assertMappedStatement(
8081
MappedStatement::createFromModel($statement),
8182
$mappedStatement
8283
);
@@ -90,13 +91,14 @@ public function testSave()
9091
public function testSaveWithoutFlush()
9192
{
9293
$statement = StatementFixtures::getMinimalStatement();
94+
$self = $this;
9395
$this
9496
->mappedStatementRepository
9597
->expects($this->once())
9698
->method('storeMappedStatement')
9799
->with(
98-
$this->callback(function (MappedStatement $mappedStatement) use ($statement) {
99-
return $this->assertMappedStatement(
100+
$this->callback(function (MappedStatement $mappedStatement) use ($self, $statement) {
101+
return $self->assertMappedStatement(
100102
MappedStatement::createFromModel($statement),
101103
$mappedStatement
102104
);

0 commit comments

Comments
 (0)