Completed
Push — master ( 77cc29...840912 )
by Gerrit
10:19
created

DataSimpleSelectLoaderTest   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 292
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
wmc 7
lcom 1
cbo 4
dl 0
loc 292
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
B setUp() 0 36 1
A loadsDataFromDatabase() 0 51 1
A shouldNotLoadEntityWithoutId() 0 21 1
B storesDataInDatabase() 0 42 1
B shouldNotUpdateIfDataDidNotChange() 0 43 1
A shouldRemoveDBALForEntity() 0 5 1
A shouldPrepareOnMetadataLoad() 0 5 1
1
<?php
2
/**
3
 * Copyright (C) 2018 Gerrit Addiks.
4
 * This package (including this file) was released under the terms of the GPL-3.0.
5
 * You should have received a copy of the GNU General Public License along with this program.
6
 * If not, see <http://www.gnu.org/licenses/> or send me a mail so i can send you a copy.
7
 * @license GPL-3.0
8
 * @author Gerrit Addiks <[email protected]>
9
 */
10
11
namespace Addiks\RDMBundle\Tests\DataLoader;
12
13
use Addiks\RDMBundle\DataLoader\SimpleSelectDataLoader;
14
use Addiks\RDMBundle\Mapping\Drivers\MappingDriverInterface;
15
use Addiks\RDMBundle\Mapping\EntityMapping;
16
use Addiks\RDMBundle\Tests\Hydration\EntityExample;
17
use Addiks\RDMBundle\Mapping\ChoiceMapping;
18
use Addiks\RDMBundle\ValueResolver\ValueResolverInterface;
19
use Doctrine\ORM\EntityManagerInterface;
20
use Doctrine\ORM\Mapping\ClassMetadata;
21
use Doctrine\DBAL\Connection;
22
use Doctrine\DBAL\Query\QueryBuilder;
23
use Doctrine\ORM\Query\Expr;
24
use Doctrine\DBAL\Driver\Statement;
25
use PHPUnit\Framework\TestCase;
26
use Addiks\RDMBundle\Mapping\ServiceMapping;
27
use Doctrine\ORM\UnitOfWork;
28
use Addiks\RDMBundle\Tests\Hydration\ServiceExample;
29
use Addiks\RDMBundle\Mapping\MappingInterface;
30
use Addiks\RDMBundle\Mapping\EntityMappingInterface;
31
use Doctrine\DBAL\Schema\Column;
32
33
final class DataSimpleSelectLoaderTest extends TestCase
34
{
35
36
    /**
37
     * @var SimpleSelectDataLoader
38
     */
39
    private $dataLoader;
40
41
    /**
42
     * @var MappingDriverInterface
43
     */
44
    private $mappingDriver;
45
46
    /**
47
     * @var ValueResolverInterface
48
     */
49
    private $valueResolver;
0 ignored issues
show
Unused Code introduced by
The property $valueResolver is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
50
51
    /**
52
     * @var ClassMetadata
53
     */
54
    private $classMetaData;
55
56
    /**
57
     * @var Connection
58
     */
59
    private $connection;
60
61
    /**
62
     * @var QueryBuilder
63
     */
64
    private $queryBuilder;
65
66
    /**
67
     * @var Expr
68
     */
69
    private $expr;
70
71
    /**
72
     * @var Statement
73
     */
74
    private $statement;
75
76
    /**
77
     * @var EntityManagerInterface
78
     */
79
    private $entityManager;
80
81
    /**
82
     * @var UnitOfWork
83
     */
84
    private $unitOfWork;
85
86
    /**
87
     * @var EntityMappingInterface
88
     */
89
    private $entityMapping;
90
91
    /**
92
     * @var ChoiceMapping
93
     */
94
    private $mappings = array();
95
96
    public function setUp()
97
    {
98
        $this->mappingDriver = $this->createMock(MappingDriverInterface::class);
0 ignored issues
show
Documentation Bug introduced by
It seems like $this->createMock(\Addik...DriverInterface::class) of type object<PHPUnit\Framework\MockObject\MockObject> is incompatible with the declared type object<Addiks\RDMBundle\...MappingDriverInterface> of property $mappingDriver.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
99
        $this->connection = $this->createMock(Connection::class);
0 ignored issues
show
Documentation Bug introduced by
It seems like $this->createMock(\Doctr...DBAL\Connection::class) of type object<PHPUnit\Framework\MockObject\MockObject> is incompatible with the declared type object<Doctrine\DBAL\Connection> of property $connection.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
100
        $this->queryBuilder = $this->createMock(QueryBuilder::class);
0 ignored issues
show
Documentation Bug introduced by
It seems like $this->createMock(\Doctr...ry\QueryBuilder::class) of type object<PHPUnit\Framework\MockObject\MockObject> is incompatible with the declared type object<Doctrine\DBAL\Query\QueryBuilder> of property $queryBuilder.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
101
        $this->expr = $this->createMock(Expr::class);
0 ignored issues
show
Documentation Bug introduced by
It seems like $this->createMock(\Doctr...\ORM\Query\Expr::class) of type object<PHPUnit\Framework\MockObject\MockObject> is incompatible with the declared type object<Doctrine\ORM\Query\Expr> of property $expr.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
102
        $this->statement = $this->createMock(Statement::class);
0 ignored issues
show
Documentation Bug introduced by
It seems like $this->createMock(\Doctr...river\Statement::class) of type object<PHPUnit\Framework\MockObject\MockObject> is incompatible with the declared type object<Doctrine\DBAL\Driver\Statement> of property $statement.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
103
        $this->entityManager = $this->createMock(EntityManagerInterface::class);
0 ignored issues
show
Documentation Bug introduced by
It seems like $this->createMock(\Doctr...anagerInterface::class) of type object<PHPUnit\Framework\MockObject\MockObject> is incompatible with the declared type object<Doctrine\ORM\EntityManagerInterface> of property $entityManager.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
104
        $this->unitOfWork = $this->createMock(UnitOfWork::class);
0 ignored issues
show
Documentation Bug introduced by
It seems like $this->createMock(\Doctr...\ORM\UnitOfWork::class) of type object<PHPUnit\Framework\MockObject\MockObject> is incompatible with the declared type object<Doctrine\ORM\UnitOfWork> of property $unitOfWork.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
105
        $this->entityMapping = $this->createMock(EntityMappingInterface::class);
0 ignored issues
show
Documentation Bug introduced by
It seems like $this->createMock(\Addik...appingInterface::class) of type object<PHPUnit\Framework\MockObject\MockObject> is incompatible with the declared type object<Addiks\RDMBundle\...EntityMappingInterface> of property $entityMapping.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
106
107
        $this->dataLoader = new SimpleSelectDataLoader(
108
            $this->mappingDriver,
0 ignored issues
show
Documentation introduced by
$this->mappingDriver is of type object<PHPUnit\Framework\MockObject\MockObject>, but the function expects a object<Addiks\RDMBundle\...MappingDriverInterface>.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
109
            1
110
        );
111
112
        $this->classMetaData = new ClassMetadata(EntityExample::class);
113
        $this->classMetaData->table = ['name' => 'some_table'];
114
        $this->classMetaData->identifier = ["id"];
115
        $this->classMetaData->fieldMappings = [
116
            "id" => [
117
                'columnName' => 'id'
118
            ]
119
        ];
120
121
        $this->mappings['foo'] = $this->createMock(MappingInterface::class);
122
        $this->mappings['bar'] = $this->createMock(MappingInterface::class);
123
124
        $this->mappingDriver->method("loadRDMMetadataForClass")->willReturn($this->entityMapping);
125
        $this->entityManager->method("getClassMetadata")->willReturn($this->classMetaData);
126
        $this->entityManager->method("getConnection")->willReturn($this->connection);
127
        $this->entityManager->method("getUnitOfWork")->willReturn($this->unitOfWork);
128
        $this->connection->method('createQueryBuilder')->willReturn($this->queryBuilder);
129
        $this->queryBuilder->method('expr')->willReturn($this->expr);
130
        $this->queryBuilder->method('execute')->willReturn($this->statement);
131
    }
132
133
    /**
134
     * @test
135
     */
136
    public function loadsDataFromDatabase()
137
    {
138
        /** @var array $expectedData */
139
        $expectedData = array(
140
            'foo_column' => 'Lorem ipsum',
141
            'bar_column' => 'dolor sit amet'
142
        );
143
144
        $this->classMetaData->identifier = ["id", "secondId"];
145
        $this->classMetaData->fieldMappings = [
146
            "id"  => ['columnName' => 'id'],
147
            "secondId"  => ['columnName' => 'secondId'],
148
            "faz" => ['columnName' => 'faz']
149
        ];
150
151
        $this->queryBuilder->expects($this->once())->method('from')->with($this->equalTo('some_table'));
0 ignored issues
show
Bug introduced by
The method expects() does not seem to exist on object<Doctrine\DBAL\Query\QueryBuilder>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
152
        $this->queryBuilder->expects($this->exactly(2))->method('andWhere')->with($this->equalTo("*eq-return*"));
0 ignored issues
show
Bug introduced by
The method expects() does not seem to exist on object<Doctrine\DBAL\Query\QueryBuilder>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
153
        $this->queryBuilder->expects($this->exactly(2))->method('addSelect');
0 ignored issues
show
Bug introduced by
The method expects() does not seem to exist on object<Doctrine\DBAL\Query\QueryBuilder>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
154
        $this->queryBuilder->expects($this->once())->method('setMaxResults')->with($this->equalTo(1));
0 ignored issues
show
Bug introduced by
The method expects() does not seem to exist on object<Doctrine\DBAL\Query\QueryBuilder>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
155
156
        $this->statement->method('fetch')->willReturn($expectedData);
0 ignored issues
show
Bug introduced by
The method method() does not seem to exist on object<Doctrine\DBAL\Driver\Statement>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
157
158
        /** @var ServiceExample $fazService */
159
        $fazService = $this->createMock(ServiceExample::class);
160
161
        $entity = new EntityExample(null, null, null, $fazService, null, "second_id");
162
        $entity->id = "123";
163
164
        $this->expr->expects($this->exactly(2))->method("eq")->willReturn("*eq-return*")->withConsecutive(
0 ignored issues
show
Bug introduced by
The method expects() does not seem to exist on object<Doctrine\ORM\Query\Expr>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
165
            ['id', '123'],
166
            ['secondId', "'second_id'"]
167
        );
168
169
        /** @var Column $columnA */
170
        $columnA = $this->createMock(Column::class);
171
        $columnA->method('getName')->willReturn("id");
0 ignored issues
show
Bug introduced by
The method method() does not seem to exist on object<Doctrine\DBAL\Schema\Column>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
172
173
        /** @var Column $columnA */
174
        $columnB = $this->createMock(Column::class);
175
        $columnB->method('getName')->willReturn("secondId");
176
177
        $this->entityMapping->method('collectDBALColumns')->willReturn([
0 ignored issues
show
Bug introduced by
The method method() does not seem to exist on object<Addiks\RDMBundle\...EntityMappingInterface>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
178
            $columnA,
179
            $columnB
180
        ]);
181
182
        /** @var array $actualData */
183
        $actualData = $this->dataLoader->loadDBALDataForEntity($entity, $this->entityManager);
184
185
        $this->assertEquals($expectedData, $actualData);
186
    }
187
188
    /**
189
     * @test
190
     */
191
    public function shouldNotLoadEntityWithoutId()
192
    {
193
        /** @var array $expectedData */
194
        $expectedData = array();
195
196
        $this->classMetaData->identifier = [];
197
198
        $this->queryBuilder->expects($this->never())->method('from');
0 ignored issues
show
Bug introduced by
The method expects() does not seem to exist on object<Doctrine\DBAL\Query\QueryBuilder>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
199
200
        $this->statement->method('fetch')->willReturn($expectedData);
0 ignored issues
show
Bug introduced by
The method method() does not seem to exist on object<Doctrine\DBAL\Driver\Statement>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
201
202
        $entity = new EntityExample();
203
        $entity->id = "some_id";
204
205
        $this->expr->method("eq")->willReturn("*eq-return*");
0 ignored issues
show
Bug introduced by
The method method() does not seem to exist on object<Doctrine\ORM\Query\Expr>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
206
207
        /** @var array $actualData */
208
        $actualData = $this->dataLoader->loadDBALDataForEntity($entity, $this->entityManager);
209
210
        $this->assertEquals($expectedData, $actualData);
211
    }
212
213
    /**
214
     * @test
215
     */
216
    public function storesDataInDatabase()
217
    {
218
        $this->mappings['faz'] = $this->createMock(MappingInterface::class);
219
220
        $this->setUp();
221
222
        $this->entityMapping->method('getEntityClassName')->willReturn(EntityExample::class);
0 ignored issues
show
Bug introduced by
The method method() does not seem to exist on object<Addiks\RDMBundle\...EntityMappingInterface>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
223
        $this->entityMapping->method('getFieldMappings')->willReturn($this->mappings);
0 ignored issues
show
Bug introduced by
The method method() does not seem to exist on object<Addiks\RDMBundle\...EntityMappingInterface>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
224
225
        $this->classMetaData->identifier = ["id", "faz"];
226
        $this->classMetaData->fieldMappings = [
227
            "id"  => ['columnName' => 'id'],
228
            "faz" => ['columnName' => 'faz']
229
        ];
230
231
        /** @var ServiceExample $fazService */
232
        $fazService = $this->createMock(ServiceExample::class);
233
234
        $entity = new EntityExample(null, null, null, $fazService);
235
        $entity->id = "some_id";
236
        $entity->foo = "some_ipsum_service";
0 ignored issues
show
Documentation Bug introduced by
It seems like 'some_ipsum_service' of type string is incompatible with the declared type object<Addiks\RDMBundle\...dration\ServiceExample> of property $foo.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
237
        $entity->bar = "some_dolor_service";
0 ignored issues
show
Documentation Bug introduced by
It seems like 'some_dolor_service' of type string is incompatible with the declared type object<Addiks\RDMBundle\...dration\ServiceExample> of property $bar.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
238
239
        $this->mappings['foo']->method("revertValue")->willReturn(["foo_column" => "ipsum"]);
240
        $this->mappings['bar']->method("revertValue")->willReturn(["bar_column" => "dolor"]);
241
        $this->mappings['faz']->method("revertValue")->willReturn(["faz_column" => "sit"]);
242
243
        $this->connection->expects($this->once())->method("update")->with(
0 ignored issues
show
Bug introduced by
The method expects() does not seem to exist on object<Doctrine\DBAL\Connection>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
244
            $this->equalTo("some_table"),
245
            $this->equalTo([
246
                'foo_column' => 'ipsum',
247
                'bar_column' => 'dolor',
248
                'faz_column' => 'sit'
249
            ]),
250
            $this->equalTo([
251
                'id'  => "some_id",
252
                'faz' => $fazService
253
            ])
254
        );
255
256
        $this->dataLoader->storeDBALDataForEntity($entity, $this->entityManager);
257
    }
258
259
    /**
260
     * @test
261
     */
262
    public function shouldNotUpdateIfDataDidNotChange()
263
    {
264
        $entity = new EntityExample();
265
        $entity->id = "some_id";
266
        $entity->foo = "some_ipsum_service";
0 ignored issues
show
Documentation Bug introduced by
It seems like 'some_ipsum_service' of type string is incompatible with the declared type object<Addiks\RDMBundle\...dration\ServiceExample> of property $foo.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
267
        $entity->bar = "some_dolor_service";
0 ignored issues
show
Documentation Bug introduced by
It seems like 'some_dolor_service' of type string is incompatible with the declared type object<Addiks\RDMBundle\...dration\ServiceExample> of property $bar.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
268
269
        $this->entityMapping->method('getEntityClassName')->willReturn(EntityExample::class);
0 ignored issues
show
Bug introduced by
The method method() does not seem to exist on object<Addiks\RDMBundle\...EntityMappingInterface>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
270
        $this->entityMapping->method('getFieldMappings')->willReturn($this->mappings);
0 ignored issues
show
Bug introduced by
The method method() does not seem to exist on object<Addiks\RDMBundle\...EntityMappingInterface>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
271
272
        $this->mappings['foo']->method("revertValue")->willReturn(["foo_column" => "ipsum"]);
273
        $this->mappings['bar']->method("revertValue")->willReturn(["bar_column" => "dolor"]);
274
275
        /** @var array $map */
276
        $map = array(
0 ignored issues
show
Unused Code introduced by
$map is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
277
            "some_ipsum_service" => ["foo_column" => "ipsum"],
278
            "some_dolor_service" => ["bar_column" => "dolor"],
279
        );
280
281
#        $this->valueResolver->method("revertValue")->will($this->returnCallback(
0 ignored issues
show
Unused Code Comprehensibility introduced by
63% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
282
#            function ($fieldMapping, $context, $value) use ($map) {
283
#                return $map[$value];
284
#            }
285
#        ));
286
287
#        $this->valueResolver->method("revertValue")->will($this->returnValueMap([
0 ignored issues
show
Unused Code Comprehensibility introduced by
70% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
288
#            [$this->mappings['foo'], $entity, "some_ipsum_service", ["foo_column" => "ipsum"]],
289
#            [$this->mappings['bar'], $entity, "some_dolor_service", ["bar_column" => "dolor"]],
290
#        ]));
291
292
        $this->connection->expects($this->never())->method("update");
0 ignored issues
show
Bug introduced by
The method expects() does not seem to exist on object<Doctrine\DBAL\Connection>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
293
294
        /** @var array $expectedData */
295
        $expectedData = [
296
            'foo_column' => 'ipsum',
297
            'bar_column' => 'dolor'
298
        ];
299
300
        $this->statement->method('fetch')->willReturn($expectedData);
0 ignored issues
show
Bug introduced by
The method method() does not seem to exist on object<Doctrine\DBAL\Driver\Statement>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
301
302
        $this->dataLoader->loadDBALDataForEntity($entity, $this->entityManager);
303
        $this->dataLoader->storeDBALDataForEntity($entity, $this->entityManager);
304
    }
305
306
    /**
307
     * @test
308
     */
309
    public function shouldRemoveDBALForEntity()
310
    {
311
        $this->dataLoader->removeDBALDataForEntity(new EntityExample(), $this->entityManager);
312
        $this->assertTrue(true);
313
    }
314
315
    /**
316
     * @test
317
     */
318
    public function shouldPrepareOnMetadataLoad()
319
    {
320
        $this->dataLoader->prepareOnMetadataLoad($this->entityManager, $this->classMetaData);
321
        $this->assertTrue(true);
322
    }
323
324
}
325