Skip to content

Commit c2a2c54

Browse files
committed
Update tests
1 parent 0653bf9 commit c2a2c54

File tree

7 files changed

+22
-21
lines changed

7 files changed

+22
-21
lines changed

tests/Unit/Connection/ImapCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
]);
4242
});
4343

44-
test('__toString returns the command lines joined by CRLF', function () {
44+
test('to string returns the command lines joined by CRLF', function () {
4545
$cmd = new ImapCommand('A003', 'APPEND "INBOX"', [
4646
['{20}', 'literal-data'],
4747
]);

tests/Unit/Connection/Responses/ContinuationResponseTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
test('data', function () {
77
$response = new ContinuationResponse([
8-
new Atom('a'),
8+
new Atom('+'),
99
new Atom('b'),
1010
new Atom('c'),
1111
]);
@@ -15,3 +15,4 @@
1515
new Atom('c'),
1616
]);
1717
});
18+

tests/Unit/Connection/Responses/Data/ListDataTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use DirectoryTree\ImapEngine\Connection\Responses\Data\ListData;
44
use DirectoryTree\ImapEngine\Connection\Tokens\Atom;
55

6-
test('toString', function () {
6+
test('to string', function () {
77
$response = new ListData([
88
new Atom('a'),
99
new Atom('b'),

tests/Unit/Connection/Responses/Data/ResponseCodeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use DirectoryTree\ImapEngine\Connection\Responses\Data\ResponseCodeData;
44
use DirectoryTree\ImapEngine\Connection\Tokens\Atom;
55

6-
test('toString', function () {
6+
test('to string', function () {
77
$response = new ResponseCodeData([
88
new Atom('a'),
99
new Atom('b'),

tests/Unit/Connection/Responses/ResponseTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
]);
1818
});
1919

20-
test('toArray', function () {
20+
test('to array', function () {
2121
$response = new Response([
2222
new Atom('a'),
2323
new Atom('b'),
@@ -31,7 +31,7 @@
3131
]);
3232
});
3333

34-
test('toString', function () {
34+
test('to string', function () {
3535
$response = new Response([
3636
new Atom('a'),
3737
new Atom('b'),

tests/Unit/Connection/Responses/TaggedResponseTest.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,30 @@
55

66
test('tag', function () {
77
$response = new TaggedResponse([
8-
new Atom('a'),
8+
new Atom('TAG1'),
99
new Atom('b'),
1010
new Atom('c'),
1111
]);
1212

1313
expect($response->tag())->toEqual(
14-
new Atom('a')
14+
new Atom('TAG1')
1515
);
1616
});
1717

1818
test('status', function () {
1919
$response = new TaggedResponse([
20-
new Atom('a'),
21-
new Atom('b'),
20+
new Atom('TAG1'),
21+
new Atom('OK'),
2222
new Atom('c'),
2323
]);
2424

25-
expect($response->status())->toEqual(new Atom('b'));
25+
expect($response->status())->toEqual(new Atom('OK'));
2626
});
2727

2828
test('data', function () {
2929
$response = new TaggedResponse([
30-
new Atom('a'),
31-
new Atom('b'),
30+
new Atom('TAG1'),
31+
new Atom('OK'),
3232
new Atom('c'),
3333
]);
3434

@@ -39,21 +39,21 @@
3939

4040
test('successful', function () {
4141
$response = new TaggedResponse([
42-
new Atom('a'),
42+
new Atom('TAG1'),
4343
new Atom('OK'),
4444
]);
4545

4646
expect($response->successful())->toBeTrue();
4747

4848
$response = new TaggedResponse([
49-
new Atom('a'),
49+
new Atom('TAG1'),
5050
new Atom('NO'),
5151
]);
5252

5353
expect($response->successful())->toBeFalse();
5454

5555
$response = new TaggedResponse([
56-
new Atom('a'),
56+
new Atom('TAG1'),
5757
new Atom('BAD'),
5858
]);
5959

@@ -62,21 +62,21 @@
6262

6363
test('failed', function () {
6464
$response = new TaggedResponse([
65-
new Atom('a'),
65+
new Atom('TAG1'),
6666
new Atom('OK'),
6767
]);
6868

6969
expect($response->failed())->toBeFalse();
7070

7171
$response = new TaggedResponse([
72-
new Atom('a'),
72+
new Atom('TAG1'),
7373
new Atom('NO'),
7474
]);
7575

7676
expect($response->failed())->toBeTrue();
7777

7878
$response = new TaggedResponse([
79-
new Atom('a'),
79+
new Atom('TAG1'),
8080
new Atom('BAD'),
8181
]);
8282

tests/Unit/Connection/Responses/UntaggedResponseTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
test('type', function () {
77
$response = new UntaggedResponse([
8-
new Atom('a'),
8+
new Atom('*'),
99
new Atom('b'),
1010
new Atom('c'),
1111
]);
@@ -17,7 +17,7 @@
1717

1818
test('data', function () {
1919
$response = new UntaggedResponse([
20-
new Atom('a'),
20+
new Atom('*'),
2121
new Atom('b'),
2222
new Atom('c'),
2323
]);

0 commit comments

Comments
 (0)