Skip to content

Commit a23e6d2

Browse files
committed
Replicate new array structure in fake folder
1 parent 01b7381 commit a23e6d2

File tree

2 files changed

+26
-9
lines changed

2 files changed

+26
-9
lines changed

src/Testing/FakeFolder.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,16 +142,16 @@ public function expunge(): array
142142
public function quota(): array
143143
{
144144
return [
145-
'MESSAGE' => [
146-
'usage' => 0,
147-
'limit' => 0,
145+
$this->path => [
146+
'STORAGE' => [
147+
'usage' => 0,
148+
'limit' => 0,
149+
],
150+
'MESSAGE' => [
151+
'usage' => 0,
152+
'limit' => 0,
153+
],
148154
],
149-
'STORAGE' => [
150-
'usage' => 0,
151-
'limit' => 0,
152-
],
153-
'usage' => 0,
154-
'limit' => 0,
155155
];
156156
}
157157

tests/Unit/Testing/FakeFolderTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,20 @@
111111
expect($folder->messages()->where('Unseen')->count())->toBe(3);
112112
expect($folder->messages()->where('Seen')->count())->toBe(3);
113113
});
114+
115+
test('it returns stub quota values', function () {
116+
$folder = new FakeFolder('INBOX');
117+
118+
expect($folder->quota())->toBe([
119+
'INBOX' => [
120+
'STORAGE' => [
121+
'usage' => 0,
122+
'limit' => 0,
123+
],
124+
'MESSAGE' => [
125+
'usage' => 0,
126+
'limit' => 0,
127+
],
128+
],
129+
]);
130+
});

0 commit comments

Comments
 (0)