1
0
Fork 0
mirror of synced 2024-06-29 03:30:34 +12:00

Fixed tests

This commit is contained in:
Eldad Fux 2020-11-21 10:02:25 +02:00
parent dda4f2935a
commit 4e83a988fc
4 changed files with 8 additions and 11 deletions

View file

@ -110,8 +110,7 @@ class Document extends ArrayObject
break;
case self::SET_TYPE_APPEND:
$this[$key] = (!isset($this[$key]) || !\is_array($this[$key])) ? [] : $this[$key];
// \array_push($this[$key], $value);
$this[$key][count($this[$key])] = $value;
\array_push($this[$key], $value);
break;
case self::SET_TYPE_PREPEND:
$this[$key] = (!isset($this[$key]) || !\is_array($this[$key])) ? [] : $this[$key];

View file

@ -35,11 +35,11 @@ class Platform extends Model
'description' => 'Platform Key. iOS bundle ID or Android package name. Empty string for other platforms.',
'example' => 'com.company.appname',
])
// ->addRule('store', [
// 'type' => self::TYPE_STRING,
// 'description' => 'Link to platform store.',
// 'example' => '',
// ])
->addRule('store', [
'type' => self::TYPE_STRING,
'description' => 'App store or Google Play store ID.',
'example' => '',
])
->addRule('hostname', [
'type' => self::TYPE_STRING,
'description' => 'Web app hostname. Empty string for other platforms.',

View file

@ -40,7 +40,6 @@ trait DatabaseBase
]);
$this->assertEquals($actors['headers']['status-code'], 201);
$this->assertEquals($actors['body']['$collection'], 0);
$this->assertEquals($actors['body']['name'], 'Actors');
$this->assertIsArray($actors['body']['$permissions']);
$this->assertIsArray($actors['body']['$permissions']['read']);
@ -86,7 +85,6 @@ trait DatabaseBase
]);
$this->assertEquals($movies['headers']['status-code'], 201);
$this->assertEquals($movies['body']['$collection'], 0);
$this->assertEquals($movies['body']['name'], 'Movies');
$this->assertIsArray($movies['body']['$permissions']);
$this->assertIsArray($movies['body']['$permissions']['read']);

View file

@ -123,8 +123,8 @@ trait LocaleBase
$this->assertEquals(194, $response['body']['sum']);
$this->assertIsArray($response['body']['phones']);
$this->assertEquals($response['body']['phones'][0]['code'], '+1');
$this->assertEquals($response['body']['phones'][0]['countryName'], 'United States');
$this->assertEquals($response['body']['phones'][0]['countryCode'], 'US');
$this->assertEquals($response['body']['phones'][0]['countryName'], 'Canada');
$this->assertEquals($response['body']['phones'][0]['countryCode'], 'CA');
/**
* Test for FAILURE