We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3f5c3a commit 9d29b7dCopy full SHA for 9d29b7d
src/Space.php
@@ -101,6 +101,9 @@ public function getFormat()
101
} else {
102
$this->format = $this->mapper->findOne('_space', ['id' => $this->id])->format;
103
}
104
+ if(!$this->format) {
105
+ $this->format = [];
106
+ }
107
$this->parseFormat();
108
109
tests/SchemaTest.php
@@ -5,6 +5,16 @@
5
6
class SchemaTest extends TestCase
7
{
8
+ public function testEmptySpace()
9
+ {
10
+ $mapper = $this->createMapper();
11
+ $this->clean($mapper);
12
+
13
+ $tester = $mapper->getSchema()->createSpace('tester');
14
+ $this->assertCount(0, $tester->getFormat());
15
+ $this->assertCount(0, $tester->getIndexes());
16
17
18
public function testIndexes()
19
20
$mapper = $this->createMapper();
0 commit comments