-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathSomeTest.php
More file actions
35 lines (28 loc) · 1.04 KB
/
SomeTest.php
File metadata and controls
35 lines (28 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
declare(strict_types=1);
namespace MyPlugin;
use Cake\Database\TypeFactory;
use Cake\ORM\Entity;
use Cake\ORM\Locator\LocatorAwareTrait;
use Cake\ORM\Query;
class SomeTest
{
use LocatorAwareTrait;
public function testRenames(): void
{
$entity = new Entity();
$result = $entity->isEmpty('test');
$entity->set('test', 'value'); // This should stay as is
$entity->set('test', 'value', ['asOriginal' => 'true']); // This should stay as is
$entity->set(['test' => 'value']); // This should be changed to patch
$entity->set(['test' => 'value'], ['asOriginal' => 'true']); // This should be changed to patch
$table = $this->fetchTable('Articles');
$expr = $table->find()->newExpr();
// TypeFactory::getMap($type) should be changed to getMapped($type)
$class = TypeFactory::getMap('datetime');
$allTypes = TypeFactory::getMap(); // This should stay as is
}
public function findSomething(Query $query, array $options): Query {
return $query;
}
}